Android with IntelliJ IDEA 9
Quick setup guide
I started to play with Android recently and I need it to setup my environment. There are are plenty of tutorials for Eclipse like the one directly on Developer Android web site, but fewer for IntelliJ IDEA (for example one of the first when searching for IntelliJ + Android is link to plugin on code.google.com that is out-of-date plus IntelliJ took Andtoid plugin under their wings. The most recent that I was able to found is Developing Android Applications in Maia, but even this is almost year old).
I had also quick look on NetBeans, but their progress of work on this was very slow (How to install Android plugin into NetBeans and Introducing Android Development with NetBeans). With NB I was only able to run Android 1.6 where currently the latest one is Android 2.1 and there are indications that on Google I/O May 19-20 2010 there will be some preview of Android 2.2. Not sure of the further work progress on NB plugin as it was part of Kenai which recently Oracle dropped...
At the moment I have Android running under Ubuntu 9.10 and Windows 7 with IntelliJ IDEA 9. Setup is straightforward:
- Download Android SDK for your OS
- Extract it on hard disk, when extracting DO NOT put any space in directory name
- for Ubuntu I used /home/USER
- for Windows I extracted on top level C:\
- Start Android SDK, in command line/prompt go to android directory
- in Ubuntu execute "tools/android update sdk"
- in Windows execute "tools\android.bat update sdk" (In Windows you can also double click on "SDK Setup.exe", but for some reason it was misbehaving with IntelliJ in my case, didn't let me execute Android application above version 1.6)
- The above action will pop-up following window

and here you should tick box in Misc which says "Force https://dl-ssl.google.com/android/repository/repository.xml"

- You will be either provided with available packages once you tick that box or you will need to click on "Available Packages" get them populated.

- Select which packages you want to install, press "Install Selected". You will be asked to Accept/Reject licences(number depends on selected versions) after accepting these SDK will download all necessary stuff.
- Once installation done you create "Virtual Devices" you want to use in IDE. Bellow is example of basic setup

- When you done with creating AVD you can close down Android SDK and start IntelliJ
- Start new project File >> New project >> Create project from scratch and select Android module, provide with name and location for project. Press "Next"

- Select/confirm location of source files, press "Next"
- If it is first time you are creating project for a given platform number then you will need to press "New" in SDK properties, navigate to location of Android SDK and select appropriate Android target and press "Finish" on main SDK properties window. If you previously made a project on the platform number, just hit "Refresh" and select target platform from drop down and press "Finish".

- IDE will provide you with Android project directory with basic folder structure which has activity file ready to be executed.
- After this you can press "Run" and execute skeleton of the application

