With ArcGIS for Android now available, this article discusses what steps are needed to set up your Android development environment to work with Runtime. To follow along, you will need an Android 2.2+ powered device to test your applications.
Setting up your development environment
1. Install the Java Runtime Environment (JRE) and Java Development Kit (JDK). I used Java 6. Once complete, it’s sometimes helpful to have your Java installation tied into your system’s environment variable PATH, but this is completely optional.
2. Download and unzip Eclipse 3.5, Eclipse 3.6 or higher. The Eclipse Classic version is recommended, but Eclipse IDE for Java Developers and Eclipse IDE for Java EE Developers will also work. Please note that Eclipse 3.5 (Galileo) is no longer supported with the latest version of ADT (v16). For updated system requirements, please visit http://developer.android.com/sdk/requirements.html
3. Open the eclipse.ini file and edit it to increase the amount of heap space that is available to Eclipse. The eclipse.ini file is found in the same location as the Eclipse executable. This text file contains an entry -Xmx256m usually. Increasing this to 512 should be sufficient for Eclipse.
4. Install the Android SDK and save the location of the SDK directory on your system as you will refer to the SDK directory later. You can use either of zip or exe packages but I found setting up SDK with zip easier and ‘error-free’.
5. Use the SDK Manager to install the Android SDK. Multiple Android SDKs can live on the same machine. Esri currently requires 2.2 as the minimum SDK but it does supports Android 2.x and 3.x (and 4.0 looks like it will be fine too but is currently not fully tested). Make sure you have at least Android SDK 2.2 installed:
6. Install the Android Development Tools (ADT) plug-in for Eclipse. This is a must before configuring ArcGIS Runtime SDK for Android.
7. And don’t forget to configure the ADT Plugin.
Now all we need to do is configure Eclipse with ArcGIS plug-ins for Android by creating local update site:
- Click Help, Software Updates, then Find and Install on the Eclipse main menu. The Install/Update wizard appears.
- Click the “Search for new features to install” option button and click Next.
- After you click Next on the Install/Update wizard, the Install wizard appears. Click New Local Site to create a local update site and install the ArcGIS Eclipse plug-ins.
9. Test your installation with Hello World Map
(post written by Saurabh Gupta)