进程'命令'C:\ Users \ AppData \ Local \ Android \ Sdk \ ndk-bundle \ build \ ndk-build.cmd''完成,返回值非零

时间:2019-06-20 10:00:19

标签: android gradle ndk-build

我的项目中有一个使用ndk-build的模块,它可以成功同步,但是在运行时却给我一个诸如'Process'命令'C:\ Users \ DS-24 \ AppData \ Local \ Android \ Sdk \ ndk- bundle \ build \ ndk-build.cmd''以非零退出值1'完成 下面是导入模块的build.gradle。

task ndkBuild(type: Exec, description: 'run ndk-build') {
    if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
        workingDir 'src/main/jni'
        commandLine 'C:\\Users\\DS-24\\AppData\\Local\\Android\\Sdk\\ndk-bundle\\build\\ndk-build.cmd', '-j', Runtime.runtime.availableProcessors()
    } else {
        workingDir 'src/main/jni'
        commandLine "$ndkDir/ndk-build", '-j', Runtime.runtime.availableProcessors()
    }
}

tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn(ndkBuild)
}

处理'命令'C:\ Users \ AppData \ Local \ Android \ Sdk \ ndk-bundle \ build \ ndk-build.cmd''以非零退出值1完成

0 个答案:

没有答案