Android SDK on a 64-bit linux machine

LinuxAndroid64 Bit

Linux Problem Overview


Is it possible to develop using the Android SDK on a 64-bit linux machine. The available SDK downloads seem to be just for 32-bit versions of Linux.

Linux Solutions


Solution 1 - Linux

On (K)Ubuntu you need following 32-bit packages:

sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386

for running the emulator you need that additional package:

sudo apt-get install libsdl1.2debian:i386

Solution 2 - Linux

Yes, it is. You need to install the ia32 libraries. Check out the Ubuntu Linux troubleshooting section.

apt-get install ia32-libs
apt-get install sun-java6-jdk

Solution 3 - Linux

Android SDK requires:

  • Fedora 17 64bit with Android SDK:

      sudo yum install glibc.i686 zlib.i686 libstdc++.i686 ncurses-libs.i686
    
  • Fedora 20 64bit with Android SDK

      sudo yum install glibc zlib libstdc++ ncurses-libs mesa-libGL-devel adb
    

Solution 4 - Linux

For Debian Wheezy you have to enable multiarch and then install the dependent libraries as listed in the other answers or as needed by the binaries from the tools or platform-tools directory:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386

For further libs check with ldd for referenced .so-files.

platform-tools$ ldd adb
linux-gate.so.1 => (0xf77bb000) librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf779b000) libncurses.so.5 => not found libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf7781000) libstdc++.so.6 => not found libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf775b000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf773e000) libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf75db000) libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf75d6000) /lib/ld-linux.so.2 (0xf77bc000)

So continue to install libncurses5:i386 and libstdc++6:i386 to be able to run

platform-tools$ ./adb
Android Debug Bridge version 1.0.31
...

Solution 5 - Linux

For Ubuntu 13.1 ia32-libs is not available anymore. So, you can try this one:

sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6

Solution 6 - Linux

On CentOS 6.2 I got it working with the following:

yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686

Solution 7 - Linux

Solution 8 - Linux

For those who are using Slackware click here.

I tried it with current and it works.

In short, you need to enable 32bit support by installing multilib packages.

Steps:

  1. Download the package:

    > wget -np -nH -r -A txz,tgz
    > http://slackware.com/~alien/multilib/14.0/

  2. install packages:

    ~/multilib$
    > cd ~alien/multilib/14.0/ ~/multilib/~alien/multilib/14.0/$
    > su -c "upgradepkg --reinstall --install-new *.t?z"

  3. install compatibility packages:

    ~/multilib/~alien/multilib/14.0/$
    > su -c "upgradepkg --reinstall --install-new -compat32//*.t?z"

Restart the system and voila.

Solution 9 - Linux

For openSUSE you can install the 32bit pattern package

su zypper install -t pattern 32bit

Solution 10 - Linux

On Ubuntu 13.10

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

Solution 11 - Linux

You can build sdk yourself. I will try. The 32-bit version is very slow.

Solution 12 - Linux

Presumption: Android SDK 32 bit version is installed

On my Ubuntu 12 64 bit OS, I did not have to install any of the packages mentioned in the previous comments. Install the following using Android SDK Manager -
Under Tools:
Android SDK Tools
Android SDK Platform-tools
Latest Android SDK Build-tools

Under the latest Android API (in my case, Android 4.3 (API 18)):
SDK Platform
ARM EABI v7a System Image

Under Extras:
Android Support Library

Warning- I had earlier tried using the ia32-libs package. It installed successfully and I was able to run my Android apps. However, if I restarted the machine, it would never boot. Therefore, I suggest refraining from installing ia32-libs package. If it worked for you then great. Maybe it was an issue restricted to my PC then.

Solution 13 - Linux

A slight twist on the above Q and A: I'm running Debian Wheezy (7.0) on a 64-bit System76 laptop, I had already enabled multiarch and most of the native Android tools seemed to run fine...until I tried building an app. The build failed because one of the resource utilities needed (a 32-bit) libz.so.1.

apt-get install lib32z1

...fixed it for me.

Solution 14 - Linux

For AWS Linux, I've found the solution in the old AWS Forum post.

Solution 15 - Linux

For Arch users:
You have to install the lib32-gcc-libs and lib32-ncurses packages which are in the Multilib repository. (Which you have to enable)

pacman -S lib32-gcc-libs  
pacman -S lib32-ncurses

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionD RView Question on Stackoverflow
Solution 1 - LinuxnotzView Answer on Stackoverflow
Solution 2 - LinuxMatt HugginsView Answer on Stackoverflow
Solution 3 - LinuxMariuszSView Answer on Stackoverflow
Solution 4 - LinuxsebastianwagnerView Answer on Stackoverflow
Solution 5 - Linuxuser1079877View Answer on Stackoverflow
Solution 6 - LinuxkhaglerView Answer on Stackoverflow
Solution 7 - LinuxtommedView Answer on Stackoverflow
Solution 8 - LinuxMilan KrsticView Answer on Stackoverflow
Solution 9 - LinuxSteffen ChristensenView Answer on Stackoverflow
Solution 10 - LinuxVenkyView Answer on Stackoverflow
Solution 11 - LinuximcaptorView Answer on Stackoverflow
Solution 12 - LinuxArunraj NairView Answer on Stackoverflow
Solution 13 - LinuxkramerView Answer on Stackoverflow
Solution 14 - LinuxLee Han KyeolView Answer on Stackoverflow
Solution 15 - LinuxGrrrbenView Answer on Stackoverflow