通过macosx终端编译NDK并获取#createnativelibrary

时间:2016-10-06 05:33:57

标签: macos compilation android-ndk

我收到了一个用于编译NDK应用程序的构建版本,并且在运行

时我一直收到此错误
./gradlew assembleDebug 

在mac上的终端:

[A problem occurred configuring project ':app'.
 > Exception thrown while executing model rule: NdkComponentModelPlugin.Rules#createNativeLibrary
  > Exception thrown while executing model rule: NdkComponentModelPlugin.Rules#createNativeLibrary > create(app_jni)
  > java.lang.NullPointerException (no error message)]

1 个答案:

答案 0 :(得分:1)

此处报告了类似问题:https://code.google.com/p/android/issues/detail?id=200553

听起来您需要将local.properties文件中的ndk.dir变量设置为正确的NDK路径。