Using ArcGIS Runtime SDK for Android in IntelliJ IDEA

esri-intellij

ESRI releases the Runtime SDK for Android and chooses Eclipse as the IDE by default. Here, I’m going to show how to make the SDK usable in IntelliJ IDEA.

As known generally, IntelliJ IDEA is one of the most useful JAVA IDEs and has a lot of pretty features for developers. With version 12+, it has a lot of great tools and development options that ease your coding. With IntelliJ, Android development is more easy and fun Smile Just give a try. You will not regret.

Actually there is a post about how to import the SDK Library to IntelliJ IDEA but it is not convenient for the SDK v10.1.1 which is released on July 17th. (We’ll get back to this versions of SDK’s new features soon) So I found a way to import and use the library to IntelliJ.

First of all, you must find the Jsee the files in eclipseAR files of the SDK. After you download and import it to Eclipse, just expand the library’s JAR segment to find where the JAR files are. Once you move your mouse over the files, you’ll see the tip that shows the location of them.

Just follow the path tip and find the JAR files. here are our files :

002

You should copy the files somewhere more convenient and copy the file location to your clipboard. You are going the need it. You might have to do the same process for several times. After we found our files, and copied them to somewhere easy to find, open IntellJ IDEA and create some empty Android project, (or some existing project. it doesn’t matter).

After you opened the Android project in IntelliJ IDEA, right click the project in Project window, and click the Open Module Settings (Shortcut : F4) 003

Project Structure window shows up. Click the Global Libraries. After that, click the green plus icon and select JAVA.

003

In the Select Library Files window, past the location(directory) of the JAR files on your computer. IntelliJ will find the files. Select the three files and click OK (or hit Enter). If it asks you to choose the module (the projects that you’ll use the JAR files with, select projects and click OK).

Now your Android SDK library is ready to use. Click OK button again.

Here our JAR files in the Project window and ready to use. You may need to restart the IDE.

007

Since IntelliJ is more useful for designing android layers and has smart intellisense technology, the IDEA has been a good option to develop with. I hope this tip helps. Happy coding… Smile

  • Lew Ladd

    Hi Vestanbul,

    Thanks for the tip.

    Inorder to avoid runtime errrors I had to add libruntimecore_java.so to the libs directory. Did you also need to do this? If not, what was your workaround?

    Thanks again,
    Lew.

    • http://vestanbul.com/ vestanbul

      I have not ran across any runtime errors yet. so I did not need this file. But after a new update, this file may be unnecessary…