Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install android ndk in linux?

I have downloaded android NDK from here: http://developer.android.com/tools/sdk/ndk/index.html
for Linux 64-bit (x86) android-ndk-r10c-linux-x86_64.bin. How I do install it? The instructions don't work. My OS is

57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 
like image 924
Vardan95 Avatar asked Nov 17 '14 07:11

Vardan95


People also ask

Where is Android NDK path in Ubuntu?

Open your Android Studio Preference (or "File->Settings") > Appearance & Behavior > System Settings > Android SDK. You can find the path to your SDK and NDK, which is in the same directory.

Where is Android NDK installed?

Android Studio installs all versions of the NDK in the android-sdk /ndk/ directory. Each version is located in a subdirectory with the version number as its name.


2 Answers

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.

like image 164
NuSkooler Avatar answered Sep 21 '22 13:09

NuSkooler


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:

like image 26
Maksim Turaev Avatar answered Sep 19 '22 13:09

Maksim Turaev