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 directory
aspath/to/your/workspace/INaturalistAndroid
- Check the
INaturalistAndroid
project and clickFinish
- Open menu
File / Import...
- Choose
General / Existing Projects into Workspace
Select root directory
aspath/to/your/workspace/facebook-android-sdk/facebook
- Check the
FacebookSDK
project and clickFinish
- Right-click the
FacebookSDK
project and selectBuild Path
->Configure Build Path
- Make sure that
android-support-v4.jar
does not appear (remove if so) - Copy the
android-support-v4.jar
file to yourINaturalistAndroid\libs
folder (from/android-sdk/extras/android/support/v4
) Add JARs
-> Select theINaturalistAndroid
project ->libs
folder ->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.jar
file to yourINaturalistAndroid\libs
folder (from/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/libs
) Add JARs
-> Select theINaturalistAndroid
project ->libs
folder ->google-play-services.jar
- Open menu
File / Import...
- Choose
General / Existing Existing Android Code into Workspace
Select root directory
aspath/to/your/workspace/Android-PullToRefresh/library
- Check the
library
project and clickFinish
- Open menu
File / Import...
- Choose
General / Existing Android Code into Workspace
Select root directory
aspath/to/your/workspace/actionbarsherlock
- Check the
actionbarsherlock
project and clickFinish
- Open menu
File / Import...
- Choose
General / Existing Android Code into Workspace
Select root directory
aspath/to/your/workspace/android-switch-backport
- Check the
android-switch-backport
project and clickFinish
- Right-click the
iNaturalistAndroid
project and selectProperties
- Go to
Android
tab - Scroll down to the
Library
box and clickAdd
- Select the
actionbarsherlock
,PullToRefresh-library
andandroid-switch-backport
projects and press OK - Press OK to close the dialog
- Clean and rebuild the entire workspace (all imported projects)
In theory it should build now!