Getting Android SDK working on Ubuntu 64

Johan Haleby

Today I was trying to setup the Android SDK (version 1.6_r1) on the 64 bit version of Ubuntu 9.04 (Jaunty Jackalope). After having installed the ADT Eclipse plugin and pointed out the Android SDK directory in the settings I immediately ran into the following error:

Failed to get the adb version: Cannot run program "/home/johan/devtools/android/android-sdk-linux_x86-1.6_r1/tools/adb": java.io.IOException: error=2, No such file or directory

I opened the terminal and tried to manually run an Android executable but even here it said that the file couldn't be found! The problem seemed to be that the Android executables requires 32 bit libraries that are not available in Ubuntu 64 by default. To solve this I downloaded the execellent getlibs application which is a utility for automatically resolving dependencies for 32-bit programs on a 64 bit system. So I went into platforms/android-1.6/tools in the Android SDK installation folder and executed:

 
getlibs aapt
 

which installed and upgraded the following libraries:

 
The following NEW packages will be installed:
  ia32-libs lib32asound2 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32z1
  libc6-i386
The following packages will be upgraded:
  libc6 libc6-dev
 

After this was done I went back into Eclipse, did a project clean and refresh and after that I was able to start the Android emulator successfully. Hopefully this may help someone who's in the same situation.

Johan Haleby
Consultant at Jayway

Tags: , , ,

4 comments ↓

#1 kevin on 11.08.09 at 5:57

Ran into the same problem!! How did you figure out it was 32-bit issues? Here’s the strange thing.. about a month or so ago I installed the jdk 1.6 from sun, eclipse 3.4 and the ADT plugin, prior to 1.6 being out. It all ran just fine on ubuntu 6.04 64-bit back then. So I was pulling my hair out today trying to figure out why the heck it wouldn’t work. So how did you find out it was some 32-bit issue, and is this something new in 1.6 or 2.0.. cause I know I didn’t have this issue before.

BTW.. it now works.. thank you very much! I’ve bookmarked this thread to share with others. Keep it up for a while.

#2 Johan Haleby on 11.08.09 at 8:29

Hi,

I’m glad that my blog could help you since I had to spend lots of time figuring this out (it’s not obvious that your missing 32bit libraries to say the least). I found the solution by loads of googling and trying out many different solutions in a sort of trial and error approach.

I’ve only used version 1.6 so I cannot say anything about the other versions. Did you run into this problem with 2.0 as well?

/Johan

#3 Sakti on 05.24.10 at 8:03

thanks, now i have idea to solve my problem

#4 ncorpse on 07.24.10 at 17:24

Hi
Thanks alot. Because of your blogpost, I just googled found this and had it working in 5 minutes.

Leave a Comment