Install android NDK in linux

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.