Install android NDK in linux
Compile JNI. If no NDK is available, an error occurs.
Error: Execution failed for task': app: compileDebugNdk '.
> NDK not configured.
Download the NDK from http://developer.android.com/tools/sdk/ndk/.Then add ndk. dir = path/to/ndk in local. properties.
(On Windows, make sure you escape backslashes, e.g. C: \ ndk rather than C: \ ndk)
Official website, with a wall, it is best to build a VPN by yourself
Https://developer.android.com/tools/sdk/ndk/index.html
Find the download package for your platform, my
Linux 64-bit (x86) android-ndk-r10d-linux-x86_64.bin
The following code is directly downloaded in the browser, and VPN is not required.
Linux 32 bit
Http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86.bin
Linux 64 bit
Http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.bin
Windows 32 bit
Http://dl.google.com/android/ndk/android-ndk-r10d-windows-x86.exe
64 bit
Http://dl.google.com/android/ndk/android-ndk-r10d-windows-x86_64.exe
Mac OS X 32 bit
Http://dl.google.com/android/ndk/android-ndk-r10d-darwin-x86.bin
64 bit
Http://dl.google.com/android/ndk/android-ndk-r10d-darwin-x86_64.bin
Installation Method:
Make sure that you have installed the Android SDK
Linux and Mac OS X (Darwin ):
Open the terminal and go to the directory where your downloaded package is located.
Execute chmod a + x to download the package name, make it executable, and then execute the installation package.
For example:
Ndk $ chmod a + x android-ndk-r10c-darwin-x86_64.bin
Ndk $./android-ndk-r10c-darwin-x86_64.bin
Windows Installation is relatively easy. Double-click the installation package
Assume that the extracted directory is under path/to/ndk.
Add ndk. dir = path/to/ndk to the local. properties file of the android studio project.
Or set the ANDROID_NDK_HOME environment variable to path/to/ndk, for example, in ~ /. Add export ANDROID_NDK_HOME =/opt/android-ndk-r10d in bashrc and restart
Author: handsome, dare not go out, programmer group: 31843264