Android Development Environment

May 27, 2019

This guide describes how to install an Android development environment.

It assumes that the following guides have already been completed:

Ubuntu 12.04 (and later)

This section covers installing v20.0.3 of the Android SDK on Ubuntu 12.04 and later.


At this time, the Android SDK doesn’t provide an automated installer for Ubuntu; only a binary bundle is available.

The following script can be saved as, and will download and install Eclipse 4.2:


# Define the URL to download the "installation" package from.

# Pull apart the name of the file that will be downloaded.

# Define the directory to save the install to.

# Create the installation directory root.
mkdir -p $installationDirectoryRoot/

# Download, extract, and relocate the installation bundle.
wget $installationUrl
tar -xzf $installationFile
rm $installationFile
mv android-sdk-linux/ $installationDirectory/
chmod -R a+rX $installationDirectory/

# Create the shell profile snippet.
cat <<EOF > /etc/profile.d/

export ANDROID_HOME=$installationDirectory


if [ -d "\$ANDROID_TOOLS" ] ; then

if [ -d "\$ANDROID_PLATFORM_TOOLS" ] ; then

# Mark the snippet as executable.
chmod a+x /etc/profile.d/

# Apply the snippet to the current shell (all other shells will pick it up at the next login).
. /etc/profile.d/

# Install some of the SDK's downloadable components.
$installationDirectory/tools/android update sdk --filter platform-tools --no-ui
$installationDirectory/tools/android update sdk --filter extra-android-support,extra-google-admob_ads_sdk,extra-google-analytics_sdk_v2,extra-google-gcm,extra-google-google_play_services,extra-google-play_apk_expansion,extra-google-play_billing,extra-google-play_licensing,extra-google-webdriver --no-ui
$installationDirectory/tools/android update sdk --filter android-17,doc-17,sample-17,sysimg-17,addon-google_apis-google-17 --no-ui
$installationDirectory/tools/android update sdk --all --filter android-10,sample-10,sysimg-10,addon-google_apis-google-10 --no-ui

Run the following commands to mark the script as executable and then run it:

$ chmod a+x
$ sudo ./

The next time you login, a profile snippet will be run that will add the SDK’s tools directory to the default path. To accomplish that in an existing terminal session (without having to logoff and login), run the following:

$ . /etc/profile.d/

Eclipse Plugin: ADT


Android’s Developer Tools include an Eclipse plugin that greatly aids in the development of Android code. It should be installed as follows:

  1. Install the plugin from the Eclipse update site. The following command will do this automatically (run it from the Eclipse installation to be modified):

     $ eclipse -application org.eclipse.equinox.p2.director -repository -installIU
  2. Allow Eclipse to restart.
  3. The Configure SDK screen will appear for ADT.
  4. Select Use existing SDKs.
  5. Enter the path to the Android SDK, e.g. /usr/local/android-sdk/android-sdk_r21.1-linux.
  6. Click Next.
  7. Select whether or not you wish to Send usage statistics to Google and click Finish.