iNaturalistAndroid is an Android app for iNaturalist.org.
cd path/to/your/workspace
git clone [email protected]:inaturalist/iNaturalistAndroid.git
# Get the JAR deps
mkdir iNaturalistAndroid/libs/
cd iNaturalistAndroid/libs/
wget https://github.com/loopj/android-async-http/raw/master/releases/android-async-http-1.3.1.jar
wget http://psg.mtu.edu/pub/apache//commons/collections/binaries/commons-collections-3.2.1-bin.tar.gz
tar xzvf commons-collections-3.2.1-bin.tar.gz
wget http://apache.cs.utah.edu//commons/lang/binaries/commons-lang3-3.1-bin.tar.gz
tar xzvf commons-lang3-3.1-bin.tar.gz
wget http://archive.apache.org/dist/httpcomponents/httpclient/binary/httpcomponents-client-4.1.2-bin.tar.gz
tar xzvf httpcomponents-client-4.1.2-bin.tar.gz
cd ../../
# Get the FacebookSDK
git clone git://github.com/facebook/facebook-android-sdk.git
./facebook-android-sdk/scripts/build_and_test.sh
# Remove the file `facebook\libs\android-support-v4.jar` (since we have a newer copy of that file within our iNat project)
# Get the Android-PullToRefresh library
git clone git://github.com/budowski/Android-PullToRefresh.git
# Get the ActionBarSherlock library
wget https://codeload.github.com/JakeWharton/ActionBarSherlock/legacy.zip/4.4.0
# Extract only the `actionbarsherlock` folder
# Remove the file `actionbarsherlock\libs\android-support-v4.jar` (since we have a newer copy of that file within our iNat project)
# Get the Android Switch Backport library
wget https://github.com/BoD/android-switch-backport/archive/master.zip
# Extract only the `library` folder
# Copy the example config file and add your own API keys etc
cp iNaturalistAndroid/res/values/config.xml.example iNaturalistAndroid/res/values/config.xml- Open menu
File / Import... - Choose
General / Existing Projects into Workspace Select root directoryaspath/to/your/workspace/INaturalistAndroid- Check the
INaturalistAndroidproject and clickFinish - Open menu
File / Import... - Choose
General / Existing Projects into Workspace Select root directoryaspath/to/your/workspace/facebook-android-sdk/facebook- Check the
FacebookSDKproject and clickFinish - Right-click the
FacebookSDKproject and selectBuild Path->Configure Build Path - Make sure that
android-support-v4.jardoes not appear (remove if so) - Copy the
android-support-v4.jarfile to yourINaturalistAndroid\libsfolder (from/android-sdk/extras/android/support/v4) Add JARs-> Select theINaturalistAndroidproject ->libsfolder ->android-support-v4.jar- Install Google Play Services SDK (as specified in
http://developer.android.com/google/play-services/setup.html) using the SDK Manager - Copy the
google-play-services.jarfile to yourINaturalistAndroid\libsfolder (from/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/libs) Add JARs-> Select theINaturalistAndroidproject ->libsfolder ->google-play-services.jar- Open menu
File / Import... - Choose
General / Existing Existing Android Code into Workspace Select root directoryaspath/to/your/workspace/Android-PullToRefresh/library- Check the
libraryproject and clickFinish - Open menu
File / Import... - Choose
General / Existing Android Code into Workspace Select root directoryaspath/to/your/workspace/actionbarsherlock- Check the
actionbarsherlockproject and clickFinish - Open menu
File / Import... - Choose
General / Existing Android Code into Workspace Select root directoryaspath/to/your/workspace/android-switch-backport- Check the
android-switch-backportproject and clickFinish - Right-click the
iNaturalistAndroidproject and selectProperties - Go to
Androidtab - Scroll down to the
Librarybox and clickAdd - Select the
actionbarsherlock,PullToRefresh-libraryandandroid-switch-backportprojects and press OK - Press OK to close the dialog
- Clean and rebuild the entire workspace (all imported projects)
In theory it should build now!