Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install the Android NDK bundle using the command line?

Tags:

The Android NDK can now be installed directly from the SDK manager instead of only as a separate download. How can I install the NDK package from the command line?

I've tried:

android sdk update -u -n -a

but no NDK package appears to be visible in the listing. It only shows up in the UI.

like image 900
Jake Petroules Avatar asked Mar 18 '16 01:03

Jake Petroules


People also ask

How do I know if NDK is installed?

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 can I find Android NDK?

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.

Where can I download NDK?

Install the Android NDK (native development kit): On the PC, download and unzip the NDK for your Windows version (32-bit or 64-bit), available here: http://developer.android.com/tools/sdk/ndk/index.html.


2 Answers

In Android Studio 2.3 is sdkmanager tool

It is located in the sdk directory (i.e. ~/Android/Sdk/tools/bin)

to get a list of installed and available packages goto the directory where the sdkmanager binary is located and type ./sdkmanager --list

to install NDK directly use ./sdkmanager "ndk-bundle"

(./sdkmanager "lldb;2.3", ./sdkmanager "cmake;3.6.3155560")

https://developer.android.com/studio/command-line/sdkmanager.html

like image 111
ralf htp Avatar answered Oct 05 '22 12:10

ralf htp


  1. Download zip file of required version of ndk from developer.android.com. E.g. for linux:

    wget https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip

  2. Extract zip to some folder, e.g. c:/android/android-ndk-r13b/

  3. Add/update the path to that folder in the local.properties file of your application.

    ndk.dir=c:\android\android-ndk-r13b

like image 41
shtolik Avatar answered Oct 05 '22 11:10

shtolik