Cordova Android构建失败

时间:2015-12-07 21:46:48

标签: android cordova ubuntu-14.04 ioexception

我正在尝试为Android构建一个cordova应用程序,但是我收到了这个错误。

我正在使用Ubuntu 14.04 ......

可能是什么问题

几个小时的互联网搜索都没有帮助。

顺便说一下,我在终端找到了aapt,发现aapt位于/home/jon/Programs/android-sdk-linux/build-tools/22.0.1/aapt

root@almujtaba-Lenovo-IdeaPad-Z510:~/test/myapp# cordova build android
Running command: /home/al-mujtaba/test/myapp/platforms/android/cordov/build 
ANDROID_HOME=/home/al-mujtaba/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
Running: /home/al-mujtaba/test/myapp/platforms/android/gradlewcdvBuildDebug -b /home/al-mujtaba/test/myapp/platforms/android/build.gradle -Dorg.gradle.daemon=true
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
> java.io.IOException: Cannot run program "/home/al-mujtaba/android-sdk-linux/build-tools/22.0.1/aapt": java.io.IOException: error=2, No such file or directory

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 5.552 secs

/home/al-mujtaba/test/myapp/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: /home/al-mujtaba/test/myapp/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/al-mujtaba/test/myapp/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /home/al-mujtaba/test/myapp/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /home/al-mujtaba/test/myapp/platforms/android/cordova/build: Command failed with exit code 8

0 个答案:

没有答案