Getting Android SDK working on Ubuntu 64

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:

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:

which installed and upgraded the following libraries:

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.

This Post Has 47 Comments

  1. 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. 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. thanks, now i have idea to solve my problem

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

  5. Thanks a lot, just solved my problem.

  6. thank you!

  7. Hi. When I run adb on my 64 bit computer, adb devices says this:

    $ ./adb devices
    List of devices attached
    ???????????? no permissions

    Same thing when I run it with sudo. The phone is a Samsung Galaxy Spica. What can I do? On 32 bit Ubuntu I’ve had to use a patched adb since the original didn’t even recognize the phone.
    What can I do?

  8. Thanks for the pointer. For a few minutes I thought I was in the twilight zone not being able to execute ‘adb’ not matter how I tried.

  9. Well I have the same kinda problem
    I am working on the Ultimmate Edition 2.6 64 bit and have the new Android sdk which also includes the android 2.2 platform along with the older 1s..
    Am not able to add android libraries to the eclipse galileo…
    It gives the following error at console:
    [2010-11-15 20:31:36 – PackageName] Unable to resolve target ‘android-8’

    Please help….

  10. Hey, thank you so much!!

  11. Thank you so much. You just maid my day.

  12. Cheers buddy, managed to get this sorted after so long of trying!!

    Thanks again,

    All the best,

    Ade

  13. I think this is a problem about jre
    I try it like this:
    first,i copy a 32bit version jre from my friend’s computer and put it into ~/jre

    than,open a console window
    export PATH=$PATH:/home/erdosjiang/jre/bin
    cd /tools
    ./adb devices
    it’s ok…

    eh,,,my English is so bad,can you understand me?you can send me a email to erdosjiang@gmail.com, if you want to help me to practice my English,haha,i can teach you some Chinese too.

    For “Natanael L”,you can do like this:
    adb kill-server
    sudo adb start-server
    adb devices

    you should run adb start-server with sudo

  14. Hi,
    Thanks a lot for te explanation.
    Does anybody know if this procedure work on Macs?
    I just want to take some screenshots of an Android application. …I don’t know anything about these things.
    Can anybody help?

  15. Hey Johan,

    Thank you very much for sharing the info..

    I struggled a lot before reaching this site. and now..i can rock with Android on Ubuntu :-)

    Regards,
    Chandan

  16. Thanks you.
    Ubuntu 10.10 require the solution too.

  17. Thanks a lot. I was trying random fixes before reaching your site.

  18. Thanks man. You saved my day.

  19. Awesome.

    Worked on LMDE (Linux Mint Debian) 64 bit.

    Cheers! :D

  20. I’m running Ubuntu 11.04 – 64-bit and had no problems running the emulator.

    However, when I exit the simulator (via closing the window) – the emulator freezes every time.

    I’m tried running the -noaudio flag as suggested from different sources, but no luck. Any assistance please :).

  21. Thank you so much ! I spend 2 hours trying to get this figured out till I found your site.

  22. Ran into the same problem and it worked for me. Thank you.

  23. Thank you very much, you solved my problem in 5 minutes !

  24. Thank you very much! This method really work!!!

    BTW, this problem made me reinstall everything more than 3 times….

  25. Thanks, I like your blog…

  26. You, sir, are awesome! I would never have figured this out on my own :)

  27. Thanks a lot Jay! You saved me a lot of trouble. Should ‘ve figured it out though since the tools are named android….-x86….

  28. Thank you for posting this. You saved me a great deal of time.

  29. Thanks a lot!

  30. Thank you very much!!!!!! That did the trick!

  31. Thanks a lot for your hard work in finding and solving this problem for the rest of the world

  32. Thanks for the post. Never had problem with previous version of Kubuntu, but when i upgrade to oneiric this issue just comes up.

  33. Thanks a ton.

    Been looking for this.

  34. man!! thanks a lot!!

  35. Thanks a lot. It realy solved my problem on a Ubuntu 11.10 64 bits

  36. YES! Actually, I didn’t need to use getlib. All I needed to do was get ia32-lib through synaptic; most of the libs you list as detected by getlib were installed as dependencies. YMMV

  37. For Xubuntu 64 (about same as Ubuntu 64) 11.10, it’s still:
    * install ia32-libs (not the multi-arch version)
    * install 64-bit Eclipse (Indigo) from Synaptic or Ubuntu Software Center; this will install 64-bit openjdk-6
    * enable Helios repo in Eclipse (not Indigo)
    * install ADT (and rest of developer.android.com’s instructions for this segment)
    * restart Eclipse, point at SDK, and voila.

  38. Oh my God!! Cant believe it worked after hours of struggle…

    Ubuntu – 11.10, Indigo – 3.7.2, Android SDK 4.0.2 Manager

  39. thanks @NuShrike! easy fix!

  40. Thank you for the post.

    Enlisting how it worked for me:
    1. I was running Ubuntu Precise 64-bit. Had downloaded ADT Eclipse. Ran into adb error.
    2. Downloaded getlibs from http://ubuntuforums.org/showthread.php?t=1680819&page=2 since its not available via apt-get.
    3. Updated my ubuntu with all latest updates.
    4. Followed your blog. And it worked.
    After 1 hour, something. Thank you again.

  41. Thanks for this. I’m using crunchbang statler and this worked a treat for me

  42. Thanks for this. I’m using 64-bit crunchbang statler and it worked a treat

Leave a Reply

Close Menu