Tuesday, April 17, 2012

Eclipse is a default IDE for Android development. But personally I have always hated it since the first try. Its UI is very obscure and unobvious. There are really annoying things, like Android Logcat log displayed not as a text, but in a grid, which is difficult to view and copy from; the Logcat window itself being always on top when detached; inability to open two files with the same name from different folders. There are at least five different search commands (three of which open the same Search dialog), but there is no simple "Find Word at Caret" function, which I use a lot. Some other functionality I am used to after many years of work with Visual Studio is missing as well, like quick simple bookmarks, which could be added or navigated to with just one key press.

A while ago I was recommended to try IntelliJ IDEA, and liked it much more! Its developers at JetBrains definitely kept good IDEs in mind while creating their IDEA.

Originally Android development in IntelliJ IDEA was supported via a 3rd-party plugin, then it was included into the Ultimate Edition, but in the latest versions it comes with the Community Edition as well.

The only problem when you are using IntelliJ for Android development is the initial setup for the IDE itself, and for each new project. Every time I start using it on a new system, I spend some time trying to figure out, which bits and pieces have to be configured. Finally I've decided to write this post, so that next time when I'll need it, I'll use this information myself. :)

Here's a brief list of configuration options to set. I am not providing step-by-step instructions at the moment - may do this later, now just trying to document what I've just done, while I still remember it.

If you have several modules, set the proper dependencies in the Modules section.

You'll also need to add Run/Debug configuration. It is done using Run - Edit Configurations menu command. Just click the [+] button on the toolbar in that dialog, select Android Application, type the name for it, select the module to run, and set other parameters if needed.