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.
In Android Studio 2.3 is sdkmanager
tool
It is located in the sdk
directory (ie ~/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
Download zip file of required version of ndk from developer.android.com . Eg for linux:
wget https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
Extract zip to some folder, eg c:/android/android-ndk-r13b/
Add/update the path to that folder in the local.properties
file of your application.
ndk.dir=c:\\android\\android-ndk-r13b
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.