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.

46 Responses to “Getting Android SDK working on Ubuntu 64”

  1. mark says:

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

  2. mark says:

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

  3. Nikhil says:

    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.

  4. alutz says:

    thanks @NuShrike! easy fix!

  5. Jimmy says:

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

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

  6. NuShrike says:

    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.

  7. rick says:

    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

  8. Hudson Souza says:

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

  9. ozh says:

    man!! thanks a lot!!

  10. Shwetank says:

    Thanks a ton.

    Been looking for this.

  11. Setiawan says:

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

  12. Srini says:

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

  13. [...] http://www.jayway.com/2009/10/21/getting-android-sdk-working-on-ubuntu-64/ Share this:TwitterFacebookLike this:LikeBe the first to like this post. This entry was posted in Android by muthumanict. Bookmark the permalink. [...]

  14. [...] Flash 10.1 – WiFi , Touchscreen, Epad, Apad, now with working Android Market, Youtube – FREE Pouch.This 7" Tablet comes with Android 2.2 and can can now access the Google Android Market (UK). With Fl… Memory 256MB DDR2 Storage Device 2GB NAND Flash maximum capacity of 32GB tf card Gravity [...]

  15. Jordi says:

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

  16. britneykilla says:

    Thanks a lot!

  17. che3ver says:

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

  18. M G says:

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

  19. Me says:

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

  20. Kangqi says:

    Thanks, I like your blog…

  21. joe says:

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

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

  22. Seb says:

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

  23. Onio says:

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

  24. hamilton baker says:

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

  25. Jon says:

    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 :).

  26. Scott says:

    Awesome.

    Worked on LMDE (Linux Mint Debian) 64 bit.

    Cheers! :D

  27. Prasad says:

    Thanks man. You saved my day.

  28. Sumanth says:

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

  29. Bruce says:

    Thanks you.
    Ubuntu 10.10 require the solution too.

  30. Chandan says:

    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

  31. Albie says:

    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?

  32. erdosjiang says:

    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

  33. Ade Goodyyer says:

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

    Thanks again,

    All the best,

    Ade

  34. Thomas says:

    Thank you so much. You just maid my day.

  35. Oscar says:

    Hey, thank you so much!!

  36. Zaidceb says:

    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….

  37. Ming says:

    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.

  38. Natanael L says:

    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?

  39. Felix says:

    thank you!

  40. [...] you running 64 bit Linux? If so use getlibs – see here for a description of the problem. Type "getlibs adb" rather than aapt as [...]

  41. Sefy says:

    Thanks a lot, just solved my problem.

  42. ncorpse says:

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

  43. Sakti says:

    thanks, now i have idea to solve my problem

  44. Johan Haleby says:

    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

  45. kevin says:

    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.

Leave a Reply