This is how I managed to install the NDK on two of my 64 bit ubuntu boxes:
- Install prerequisities first:
sudo apt-get install ia32-libs
sudo apt-get install gcc-multilib
- Download and extract the NDK where you want to have it, we’ll reference the folder as <ndk>.
- In <ndk>/build/host-setup.sh file at the beginning and replace source with .
- In <ndk>/build/host-setup.sh file, find and comment the following line by putting a # in front:
[ "Windows_NT" == "$OS" ] && EXT=".exe"
- in <ndk>/build/core/ndk-common.sh file, find the setup_toolchain() function. Inside this function, replace this line:
with this one
LDFLAGS="$LDFLAGS -m32 `gcc -print-libgcc-file-name`“
You should be able to go to ndk folder and run: