Error:Execution failed for task ':library:ndkBuild'. > A problem occurred starting process 'command 'null/ndk-build''
配置NDK的的安装路径即可。
1)设置环境变量:新增ANDROID_NDK_HOME键值为Android NDK安装目录,在PATH末尾增加;%ANDROID_NDK_HOME%

或者2)在AS的project structure设置,如下图:

Android Studio编译开源项目(含NDK开发)常见报错

 

2. 调用的ndk-build命令不对

Error:Execution failed for task ':library:ndkBuild'.> A problem occurred starting process 'command 'D:\androidDev\android-ndk-r10e/ndk-build''

stackoverflow上找到原因,build.gradle文件中

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"这一行windows下应该用ndk-build.cmd(项目中有遇到)

3. 找不到boost库文件

项目Readme中有说明

Manual Build
Make sure$ANDROID_NDK_HOMEis correctly set to the root directory of your NDK installation. Also, if Boost lives in a non-standard directory (or you're on Windows) you'll need to set$BYPASS_INCLUDE_PATH to its parent directory.

  

设置环境变量:新增BYPASS_INCLUDE_PATH键值为boost的安装目录,在PATH末尾增加;%BYPASS_INCLUDE_PATH%

相关文章:

  • 2022-12-23
  • 2021-07-27
  • 2021-09-16
  • 2022-12-23
  • 2021-04-18
  • 2021-07-10
  • 2021-07-14
  • 2021-04-08
猜你喜欢
  • 2021-10-11
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2021-12-15
相关资源
相似解决方案