Skip to content
esraa-ibrahim edited this page Dec 19, 2014 · 4 revisions

Welcome to the uHunt for Android wiki!

Table of Contents

Building from Eclipse

Building from Android Studio

## Building from Eclipse
  • Import the uhunt folder as a Android project. The .project included will cause it to have the name me.kaidul.uhunt.

  • Create a libs folder at the root of the imported project.

  • Copy the following JAR files to the newly created libs folder:

  • Clone the ActionBarSherlock repository

    • Checkout tag 4.1.0
    • Import the library folder as an Android project named ABS
  • Clone the Pull To Refresh for Android repository

    • Checkout tag 1.0
    • Import the library folder as an Android project named pulltorefresh
  • Clone the Android-ProgressFragment repository

    • Checkout tag 1.3
    • Import the library folder as an Android project and use the one with named sherlockprogressfragment
  • Update the android.library.reference.* paths in the app/project.properties file. Note: this is only required if the relative paths are different than the default values which is dependent on where you've cloned the library repositories relative to the GitHub Android repository.

The me.kaidul.uhunt project should now build and be launchable and with no error markers. If you still see error markers try running the Project > Clean... menu and/or restart Eclipse.

If you still face problems, you can contact me kaidulislam90@gmail.com, I will response you ASAP.

## Building from Android Studio
  • This configuration made on Android Studio 1.0.1, and it needs also to have eclipse with ADT.
  • Import the uhunt folder as a Android project.
  • Open uHunt_for_Android\uhunt\project.properties, remove the 3 library references [Delete 3 lines of android.library.reference.*] and save the project.properties file.
  • Clone the Pull To Refresh for Android repository
    • Checkout tag 1.0
  • Clone the Android-ProgressFragment repository
    • Checkout tag 1.3
  • In Android Studio, close any projects currently open. You should see the Welcome to Android Studio window.
  • Click Import Non-Android Studio project.
  • Choose the project of uhunt, and Android Studio will create a project for you called 'app'.
  • Open Eclipse, and Update ADT Plugin (you must have version 22.0 or higher).
  • Import the 2 libraries [Pull To Refresh] and [Android-ProgressFragment] to Eclipse.
  • Select from menu File > Export.
  • In the window that appears, open Android and select Generate Gradle build files.
  • Select the 2 libraries you want to export for Android Studio and click Finish.
  • Back to Android Studio, and for every library
    • Select File > Import Module
    • Browse the location where you exported your library, and click Finish
    • Note: For [Android-ProgressFragment] just choose the sherlockprogressfragment to be imported
  • From menu File > Project Structure
  • Choose app project, and go to Dependencies tab. Then from Add sign > Module Dependency > sherlockprogressfragment and pulltorefresh
  • You will have an error in build.gradle for Module: sherlockprogressfragment, to fix that just comment the last line [apply from: '../maven_push.gradle']
  • Open file build.gradle for Module: app and add those two lines to dependencies section compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' compile 'com.android.support:support-v4:18.0.+' [1]

Links

[1] Another way to add ActionBarSherlock library to your project

Clone this wiki locally