Before developing applications for Android devices in Ubuntu, you’ll need sets of tools and packages called Android SDK and/or ADT (Android Developer Tools). These tools provide you the API libraries necessary to build, test, debug apps for Android.

This brief tutorial is going to show you how to install Android SDK as well as ADT tools which will help you develop applications for Android devices.

Google recommends that you install Android Developer Tools if you’re new to developing apps for Android. ADT includes all the essential SDK components and version of Eclipse IDE with built-tools to help you quickly develop Android apps.

With a single download of ADT, you’ll get following tools and packages:

  • Eclipse + ADT plugin
  • Android SDK Tools
  • Android Platform-tools
  • The latest Android platform
  • The latest Android system image for the emulator

Alternatively, you can just download the SDK and also begin developing apps for Android, however, you’ll need other tools when building and managing complicated applications.

To get started, you’ll need to install OpenJDK or Oracle Java JDK. The OpenJDK version comes with Ubuntu and it’s very easy to install.

To install OpenJDK in Ubuntu, press Ctrl – Alt – T on your keyboard to open the terminal. When it opens, run the commands below to install OpenJDK packages.

 sudo apt-get install openjdk-7-jre openjdk-7-jdk icedtea-7-plugin

 

android_ubuntu1210_1

 

Next, download Android SDK revision r_21.1 by running the commands below.

wget http://dl.google.com/android/android-sdk_r21.1-linux.tgz

 

android_ubuntu1210_2

 

Next, run the commands below to extract the downloaded file.

tar -xvzf android-sdk_r21.1-linux.tgz

 

android_ubuntu1210_3

 

After extracting the file, change into the tools folder by running the commands below

cd android-sdk-linux/tools/

 

android_ubuntu1210_4

 

Next, run the commands below to launch android Android SDK Manager. The manager lets you install libraries and packages suitable for developing Android apps.

./android

 

When it opens, select all the packages you which to download and install. Make sure all packages are installed then close out.

 

android_ubuntu1210

 

Finally, run the command below to open the bashrc file in your home directory.

gedit ~/.bashrc

 

Then copy and paste the lines below into the file and save it. You can put it at the top or in the middle of the file.

export PATH=${PATH}:~/android-sdk-linux/tools

export PATH=${PATH}:~/android-sdk-linux/platform-tools

 

Restart your computer and when you login, start Android Virtual Device Manager with the below command

android avd

 

Enjoy!

 

 

 

In our next post, I’ll show you how to install the ADT tools. Until then, take care.