Field Operations

The State of Eclipse with ArcGIS Android v10.2.5

The recent release of ArcGIS Runtime SDK for Android v10.2.5 is intended to be used with Android Studio as the official IDE for Android development using the Gradle-based build system. The 10.2.5 release of the Android SDK is mostly for users who want to use the official Android Development IDE.  There were only minor changes to the API with 10.2.5, please refer to the release notes to see if they affect your ArcGIS Android app workflows.  If you have been using Eclipse with ADT and the ArcGIS Android Eclipse plugin, be aware that Android Studio is the official IDE for Android, so you should migrate to Android Studio as soon as you can.  For help moving projects see our Migrating to Android Studio post.  If migrating to Android Studio is not an option in the short term, you can continue to use the ArcGIS Android Eclipse plugin with ArcGIS Android 10.2.4, but we advise that you begin to think about a migration strategy as we will not be supporting the Eclipse plugin with 10.2.5 or later versions of the SDK.  We will continue to support alternative IDE’s, e.g. Eclipse & IntelliJ IDEA, through manual project setup.

Using Eclipse with ArcGIS Android v10.2.5

You will need to download the Android SDK in order to manually set up projects in Eclipse.  Eclipse development in Android requires the ADT plugin.  You will need to uninstall any previous versions of the ArcGIS Eclipse plugin as detailed below:

Uninstall previous versions of ArcGIS Android Eclipse plugin

  1. Select Help > Installation Details
  2. Select ArcGIS for Android Core and ArcGIS for Android Doc and Samples and click Uninstall…

NOTE: In older versions you might need to run Help > About Eclipse > Installation Details or Help > Software Updates > Manage Configuration

Now that you have a clean Eclipse with ADT developer environment you can follow the instructions below:

Create an Android Application Project

Use the New Project wizard to create a new Android project:

  1. Select File > New Project from the Eclipse toolbar
  2. Select Android > Android Application Project and click Next
  3. Fill out the application and project names and ensure that the Minimum Required SDK is set to API 15 or higher and click Next
  4. Accept the defaults on the next four dialogs and click Finish

Add ArcGIS Android libs

Copy the contents from your local SDK download libs/ folder to your new project libs/ folder.

Update the Android Manifest

Open your Android Manifest file by double clicking on the AndroidManifest.xml file in your project directory.  Add the following elements to your projects manifest under <uses-sdk> and above the <application> element:

[sourcecode language=”xml”]
<uses-permission android_name="android.permission.INTERNET" />

<uses-permission android_name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android_name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android_glEsVersion="0x00020000"
android_required="true" />
[/sourcecode]

NOTE: You should add the appropriate <use-permission> that your application requires.  You do not need to add ACCESS_FINE_LOCATION if your app is not using location sources such as GPS, or WRITE_EXTERNAL_STORAGE if your app is not reading or writing files from extenal storage.

Now you are ready to start programming with the ArcGIS Android API.  Please refer to our Developer IDEs document for more information about Eclipse and other IDEs.

We understand many may want to continue to use Eclipse in the near term, but we strongly encourage you to consider migrating to Android Studio as Google is definitive about the future of Android development in Android Studio.  You can always use alternative IDE’s, e.g. Eclipse/IntelliJ IDEA, but until another IDE supports the Gradle Android based project structure, Android Studio will be the recommended IDE from Google and Esri.

0 Comments
Inline Feedbacks
View all comments

Next Article

Basemap Releases Include Over 300 New and Updated Communities

Read this article