ExError:Execution failed for task ':Fishbowl:buildNative'.
Process 'command '/Users/apple/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2
ExError:Execution failed for task ':Fishbowl:buildNative'.
Process 'command '/Users/apple/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2
有人吗?我被这个问题困扰了很久了,不知道如何下手,请教大神帮忙!谢谢
编译出错代码如下:
// 使用ndk命令行编译so库
task buildNative(type: Exec, description: 'Compile JNI sources with NDK') {
def ndkDir = plugins.getPlugin('com.android.application').sdkHandler.ndkFolder;
def ndkBuild = "$ndkDir/ndk-build"
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
ndkBuild += '.cmd'
}
commandLine "$ndkBuild",
'-C', file('src/main/jni').absolutePath, //Change directory to his before continuing
'-j', Runtime.runtime.availableProcessors(), //Might make it faster
'NDK_APPLICATION_MK="',
file('/src/main/jni/Application.mk').absolutePath, '"',
'NDK_LIBS_OUT="', file('src/main/jniLibs').absolutePath, '"', //Libs path
'NDK_OUT="', file('build/ndkcustom/obj').absolutePath, '"' //Obj path
}