Before you install IntelliJ IDEA 12 and proceed to writing your first hello-world Android application, there are a couple of things to check:

Paths to both SDKs are requested during the setup of IntelliJ IDEA and must be known anyway before you can successfully compile and deploy a sample application.

1.  Download and install the Java SDK

You can get the latest Java SDK from the Oracle’s web site.

2.  Download and install the Android SDK

You get the Android Development Tools (ADT) bundle from the Google’s web site.

Note that the official download page for Android presents various options for download.
The default ADT bundle for Windows as well as for other platforms includes Eclipse and Android plugin. If you plan to use IntelliJ IDEA as your Android IDE, then you might want to opt for a smaller download and just pick up the Android SDK and platform tools.

Downloading the Android SDK alone

By simply scrolling down the web page in the figure above, you can find specific instructions for getting the Android SDK to use with an existing IDE or for a variety of software platforms, as in the next figure.