Idea logo

The IntelliJ IDEA Blog

The Capable & Ergonomic Java IDE by JetBrains


Developing Android Applications in Maia

Maia supports development of applications for Android operating system. To begin creating an Android application, open the File menu, click New Project, click Next, and then select Android Module type:

Now you need to create Android SDK — just specify its location folder and build target. IntelliJ IDEA will create a new global library for it (to which you can later attach sources or javadoc for better coding assistance).

For that you can either click View Classpath in the Android Facet configuration (which is automatically added to your module) or edit it just as any other library. Note that Android sources and javadoc are added automatically if they are located in default locations: <sdk dir>/src and <target dir>/src for source code and <sdk dir>/docs/reference and <target dir>/docs/reference for javadoc.

You can create Activities, Services, Broadcast Receivers and Remote Interfaces (AIDL files) from popup menu (Alt+Insert). IntelliJ IDEA automatically registers them in an AndroidManifest.xml file and provides syntax highlighting for AIDL code.

To create a new Android Resource, select the res folder (or any of its specific child folders) and press Alt+Insert:

To launch an Android application you can either use an Android run configuration (created automatically when Create ‘Hello, World!’ project option is selected in Android Facet settings), or just press Ctrl+Shift+F10:

You can use external JARs in your application by just adding dependencies via Project Structure dialog, Ctrl+Shift+Alt+S. Java module dependencies can be added in a similar way.

Comments below can no longer be edited.

9 Responses to Developing Android Applications in Maia

  1. Geekycoder says:

    August 27, 2009

    That’s great !

  2. Manfred Moser says:

    September 6, 2009

    This is awesome and I am relieved to be able to keep going with IntelliJ even when using Android. One problem I found is that creating the project like this rather than with using the android command does not create any build script so you can not build the project on the command line. Could you add that back in? Or even add Maven support?

  3. llappall says:

    February 4, 2010

    How do you open/import a project you already have code for?

  4. larry says:

    June 4, 2010

    Consider adding more words and/or a screenshot concerning the creation of “Android platform” in the 4th step of making a new project. The problem I hit when doing this, for the very first time, was that to create a new “Android platform”, the “Select path” dialog actually wants the parent folder of the overall android SDK. (Offering it, for example, the “android-8” folder under /platforms/ gets a disabled Ok button). In other words, for Intellij’s label of “new” under “Android platform”, you should actually give it the root SDK, not an individual platform.

  5. Simon says:

    June 19, 2010

    Disappointed Android support is not in the community edition – Just the sort of thing I want to play around with in my spare time. Now i’m going have to use Eclipse 🙁

  6. Robert says:

    July 19, 2010

    I really wish this was in the community edition or a cheap version. After the 30 day trial is up, there’s no way I’m paying $250 to play around with Android apps in my spare time. With the price factor and lack of tutorials, I’m better off sticking with Eclipse (and waiting for Google’s free App Inventor).

  7. Mark Griffin says:

    August 6, 2010

    I use “android create project” from the command line to lay out the project folders and default files. Then I create an Idea project over the existing source. That way I have the ant build scripts as well as the Idea project. I use the ant for building a signed version, for one thing. I really find it useful to have the ant scripts that “android create project” generate.

  8. Pieter says:

    August 17, 2010

    I agree with @Robert and @Mark, it is a pity some way cannot be found to allow for seamless Android development support making it’s way into the Community Edition. It would really help to open up the market for IDEA since not everyone is exclusively committed to Eclipse, or Netbeans, for that matter.

  9. Pieter says:

    August 17, 2010

    Sorry, I meant “@Simon and @Robert”.
    @Mark, thanks for sharing your post, I might try your approach.

Discover more