The Android SDK can be installed automatically using the latest version of Gradle or downloading the Android SDK manually in several different ways. Below is an overview of all different approaches.

Installing the Android SDK (Automated Way)

Gradle 2.2.0 now supports downloading automatically dependencies. Make sure to upgrade to the latest Gradle version. The Gradle plugin to manage dependencies is now deprecated.

Installing for Ubuntu Linux

If you are using Ubuntu 15.04 or 15.10, make sure to install the following packages. Otherwise, you may notice No such file or directory when running trying to execute the aapt program that is part of the Android SDK toolset:

sudo apt-get install libc6-dev-i386 lib32z1 default-jdk

Installing the Android SDK (via Homebrew)

Assuming you have OS X running, you can use Homebrew to install the Android SDK.

This will install the Android SDK tools in /usr/local/Cellar/android-sdk/<version number>

Installing the Android SDK (Manual Way)

You will need to download the Android SDK without Android Studio bundled. Go to Android SDK and navigate to the SDK Tools Only section. Copy the URL for the download that's appropriate for your build machine OS.