Android Studio compiles open source projects (including NDK development) Common error

Source: Internet
Author: User

1. The path of the NDK is not set

Error:Execution failed for task ‘:library:ndkBuild‘. > A problem occurred starting process ‘command ‘null/ndk-build‘‘
Configure the installation path for the NDK.
1) Set Environment variables: The new ANDROID_NDK_HOME key value is the Android NDK installation directory, added at the end of Path ;%ANDROID_NDK_HOME% .

or 2) in the As Project structure settings, such as:

2. The ndk-build command called does not

Error:execution failed for task ': Library:ndkbuild ' .> A problem occurred starting process ' command ' D:\androidDev\andr Oid-ndk-r10e/ndk-build "

Find the reason on StackOverflow, in the Build.gradle file

Taskndkbuild (type:exec,description: ' Compile JNI source via NDK ') {    defndkdir =project.plugins.findplugin (' Com.android.library '). Sdkhandler.ndkfolder    workingdir "$projectDir/src/main/jni"    commandLine "$ndkDir/ Ndk-build "}

  

CommandLine "$ndkDir/ndk-build" This line should be used under Windows Ndk-build.cmd (Project has encountered)

3. Unable to find the Boost library file

Description in the Project Readme

Manual Buildmake Sure$android_ndk_homeis correctly set to the root directory of your NDK installation. Also, if Boost lives in a non-standard directory (or your re on Windows) you'll need to Set$bypass_include_path to its pare NT directory.

  

Set Environment variables: Add a new BYPASS_INCLUDE_PATH installation directory with the Boost, and add it at the end of Path ;%BYPASS_INCLUDE_PATH% .

Android Studio compiles open source projects (including NDK development) Common error

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.