我正在尝试通过cordova构建android项目,但我仍然总是有错误。这是终端输出:
tobe@tobe-laptop:~/DemoProject$ cordova build android
ANDROID_HOME=/home/tobe/android-sdk-linux
JAVA_HOME=/home/tobe/java/jdk1.8.0_91
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources FAILED
失败:构建因异常而失败。
出了什么问题: 任务'执行失败':CordovaLib:processDebugResources'。
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'命令'/home/tobe/android-sdk-linux/build-tools/23.0.3/aapt' '完成非零退出值127
尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。
建立失败
总时间:3.544秒 错误:命令的错误代码1:/ home / tobe / DemoProject / platforms / android / gradlew with args:cdvBuildDebug,-b,/ home / tobe / DemoProject / platforms / android / build.gradle,-Dorg.gradle.daemon =真,-Pandroid.useDeprecatedNdk =真