The present tutorial assumes that you have installed IntelliJ IDEA 12 Community Edition and have the Android SDK configured to create applications for the Android 2.2 platform. A lightweight IDE for Java development, IntelliJ IDEA Community Edition comes out-of-the-box with a plugin for Android development.
Note: Android 2.2 is a quite old version of the Android SDK but it ensures you can test-run your applications on a wide range of devices.
From the IntelliJ IDEA home screen, start launching the Create New Project wizard.
The next step takes you to choose the type of project you want to create: choose the type of Android module you want to build. Each choice corresponds to a different project template being created.
From the dialog box in the figure, you choose the project template and then enter essential information about the project to be created.
The most common choice is an Application Module. This option will take IntelliJ IDEA to arrange a project with some predefined structure. Basically, you can just compile the project as is and still get a nearly empty but fully functional Android application. If you choose the Empty Module option then IntelliJ IDEA will simply deliver an empty project only configured to build for the specified Android platform. No extra content will be generated. Finally, the Library Module option prepares the ground for building a class library of shared code.
Let's go for an Application Module and enter project name and destination folder. More importantly, you should choose the target Android platform. The drop-down list is prefilled with all of the platforms you selected through the SDK Manager.
Clicking Next takes you to a summary dialog box.
The dialog box below summarizes the application name and package name and allows you to set the target device and start-up activity.
The package name should be in the form com.xxx.yyy, where xxx usually stands for the company name and yyy is just the application name. You can use any names here, but the suggested pattern reduces significantly the risk of name conflicts with other applications.
IntelliJ IDEA offers to create a sample activity named MyActivity. In Android development, an activity is a plain Java class and an essential component of any Android applications.
The dialog box also gives you a chance to define how the sample application should be run by IntelliJ IDEA. There are three basic run configurations:
When ready, click Finish to have the project created.