Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What all needs to be done to install Android SDK / ADT Bundle on Ubuntu?

Each of the steps in the answer was found on some different forum as I encountered obstacles getting started with my Android SDK and posted questions in appropriate forums thereafter. So I thought this would be useful in that it is a one stop solution available, in case one ever needs to re-install Ubuntu and install the Android SDK / ADT Bundle from scratch!

share|improve this question
add comment

1 Answer

up vote 39 down vote accepted

Step 1:

Check in System Settings -> Details, whether your Ubuntu is 32-bit or 64-bit

Step 2:

(Using software centre or command lines) If your Ubuntu is a 32-bit OS then install libgl1-mesa-dev
In case of 64-bit OS install ia32-libs (Ubuntu 13.04 or earlier), or libgl1-mesa-dev:i386 (Ubuntu 13.10 and above)

Step 3: Install openjdk-6-jdk or better, openjdk-7-jdk

Step 4: Download the Android SDK or the ADT Bundle from here and unzip it to wherever you want.

Step 5: Check that the unzipped ADT Bundle folder (or Android SDK folder, as the case may be) have the folders tools and platform-tools. These folders contain some important commands stored. Add them to your executable path. Adding them to the path can be done as follows:

First execute gedit ~/.pam_environment. A file opens. Just add these lines to that file:

PATH DEFAULT=${PATH}:/path/to/tools
PATH DEFAULT=${PATH}:/path/to/platform-tools

Here you have to replace /path/to/tools and /path/to/platform-tools by the absolute paths according to where you unzipped the SDK or the ADT bundle download. Now all the commands adb, android, emulator etc can be simply executed in the terminal without giving absolute paths. That is, you will not get a "command not found" error if you gave it without its absolute path.

share|improve this answer
2  
Why would you need to modify GRUB configuration??? –  Marius Gedminas Oct 7 '13 at 15:19
1  
Very helpful and well written. +1 cause I had to use this previously on Windows and wanted to move yet another thing to Ubuntu. –  RPi Awesomeness Oct 15 '13 at 0:07
1  
@Aneesh better to put your parameters to ~/.pam_environment instead of ~/.bashrc. Session-wide environment variables –  nazar_art Dec 8 '13 at 11:43
1  
As the .pam_environment file is in the home directory, hence owned by the user, why does ... .pam_environment need to be run with the sudo command? –  Wilf Jan 9 at 22:46
3  
Really, better to add PATH="$PATH:/path/to/tools:/path/to/platform/tools" to your .profile. .pam_environment is overwritten if you change language configuration... –  Rmano Mar 6 at 14:54
show 3 more comments

protected by Braiam Jan 30 at 15:19

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.