The following guide can be applied on Mac OS X and Linux.
Download [Android Studio beta]. It includes: Android Studio (IDE based on Intellij IDEA), the Android SDK, Android tools and an Android emulator. Unzip this archive in a place you like, we're going to refer to the Android Studio directory later by AS_DIR. Note you don't have to use the Android Studio IDE. You can use your favorite editor and the command line build tool (
$ export AS_DIR="/home/user/work/Android Studio"
Install the Android SDK version 20