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 the 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 for a variety of software platforms, as in the figure below.
Once you have successfully downloaded the Android SDK for the platform of choice, you unzip it in a folder or just run the installer, if any. For the Windows platform, you find a convenient installer. As first thing the installer checks if the Java SDK is installed.
Next, you indicate the destination folder of the Android SDK files and proceeds with installation. Take a note of the installation path as IntelliJ IDEA needs to know about it to successfully compile your applications.
3. Configure Android platforms
Right after the successful completion of the setup wizard, the Android SDK is still not complete. It does contain all basic SDK tools, but it doesn’t contain any platform specific tooling. In brief, it is not fully configured to let you build applications within IntelliJ IDEA or any other IDE.
Using the SDK Manager
As there are quite a few different Android platforms out there (e.g., Android 2.2, Android 3.0, Android 4.0 and so forth). You need to install binaries and tools for each of the platforms you intend to build applications for.
You can add new platforms at any time by simply launching the SDK Manager from the installation folder. You use the SDK Manager tool also to uninstall one or more Android packages.