How to install android ndk in linux?

The Standard Way

Android's NDK now ships as an self extracting executable. You likely need to set the executable bit:

$ chmod +x android-ndk-r10c-linux-x86_64.bin
$ ./android-ndk-r10c-linux-x86_64.bin

The above will cause the NDK to extract into the current working directory.

Manual Extraction

Since the .bin file is really just a 7-Zip self extracting archive, you can manually extract the contents if needed:

$ 7za x -o/path/to/extract/to/ android-ndk-r10c-linux-x86_64.bin


7-Zip is available in Ubuntu for example via apt-get:

$ sudo apt-get install p7zip-full

Update
As of at least r14b on the NDK download page, we're back to standard ZIP archives.


If you already have AndroidStudio installed:

You can install NDK using the SDK Manager from within Android Studio

From an open project, select Tools > Android > SDK Manager from the menu bar. Click the SDK Tools tab. Check the boxes next to LLDB, CMake, and NDK. Apply

enter image description here: