Skip to content

Android SDK Install Guide

alghanmi edited this page Jul 29, 2012 · 10 revisions

As an Android fan and an owner of multiple Android devices, having the SDK installed comes in handy.

  1. Head to the official Android SDK page and download the latest version of the SDK.

  2. The following shell script will unpack and install the Android SDK for you. You will notice that after the unpacking, we are requesting an update of the SDK. That is because the downloaded file only contains basic SDK tools without any platform files or libraries. Here is a quote from the SDK read me file:

The Android SDK archive initially contains only the basic SDK tools. It does not contain an Android platform or any third-party libraries. In fact, it doesn't even have all the tools you need to develop an application.

#Extract files
sudo tar zxvf ~/Downloads/android-sdk_*.tgz -C /opt/
#Delete the sdk tarball
rm ~/Downloads/android-sdk_*.tgz

#Launch the Android SDK Manager
sudo /opt/android-sdk-linux/tools/android &
  1. Now is time to choose the APIs and tools you will need to download. I recommend you check the following top level packages:
  • Tools
  • Android 4.1 (or the latest available API) Click on Install X Packages where x is the number of packages you chose to install, then accept all licenses and install.
  1. Finally, change permissions to allow members of the developers group to access the APIs, tools and add tools and platform-tools to your path:
#Change ownership to root & fix permissions
sudo chown -R root:developers /opt/android-sdk-linux

#Add tools & platform-tools to PATH
echo '' >> ~/.bashrc
echo '##Android SDK' >> ~/.bashrc
echo 'PATH=$PATH:/opt/android-sdk-linux/platform-tools' >> ~/.bashrc
echo 'PATH=$PATH:/opt/android-sdk-linux/tools' >> ~/.bashrc

Clone this wiki locally