我最近想試試離子並專門開發android應用程序。我能夠使用離子教程設置一切,並通過本地主機運行。我想能夠使用android模擬器做同樣的事情,但一直不成功。我已經搜索並嘗試了一切,但我仍然不確定如何解決下面的錯誤。所有的代碼都來自離子入門頁面,他們的項目叫做todo。如果有人能幫助我。這將非常感激。我正在使用Ubuntu。以下是當我運行「離子構建Android」離子Android安裝失敗CordovaLib:processDebugResources
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
> com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException:
Process 'command '/home/myname/Android/Sdk/build-tools/24.0.0/aapt''
finished with non-zero exit value 127
* 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: 37.93 secs
Error: Error code 1 for command: /home/myname/todo/platforms/android
/gradlew with args: cdvBuildDebug,-b,/home/myname/todo/platforms
/android/build.gradle,-Dorg.gradle.daemon=true,
Pandroid.useDeprecatedNdk=true
編輯什麼我給終端1: 我跑到下面的命令如下建議:./gradlew assembleDebug -info,我得到以下錯誤:
:CordovaLib:processDebugResources
Executing task ':CordovaLib:processDebugResources' (up-to-datecheck
took 0.058 secs) due to:
No history is available.
All input files are considered out-of-date for incremental task
':CordovaLib:processDebugResources'.
Starting process 'command '/home/myname/Android/Sdk/build-tools/24.0.0
/aapt''. Working directory: /home/myname/todo/platforms/android
/CordovaLib Command: /home/myname/Android/Sdk/build-tools/24.0.0/aapt
package -f --no-crunch -I /home/myname/Android/Sdk/platforms/android-
23/android.jar -M /home/myname/todo/platforms/android/CordovaLib/build
/intermediates/bundles/debug/aapt/AndroidManifest.xml -S /home/myname
/todo/platforms/android/CordovaLib/build/intermediates/bundles/debug/res
-A /home/myname/todo/platforms/android/CordovaLib/build/intermediates
/bundles/debug/assets -m -J /home/myname/todo/platforms/android
/CordovaLib /build/generated/source/r/debug --debug-mode --custom-
package
org.apache.cordova --non-constant-id -0 apk --output-text-symbols
/home/myname/todo/platforms/android/CordovaLib/build/intermediates
/bundles /debug
Successfully started process 'command '/home/myname/Android/Sdk/build-
tools/24.0.0/aapt''
Unknown source file : /home/myname/Android/Sdk/build-tools/24.0.0/aapt:
1: /home/myname/Android/Sdk/build-tools/24.0.0/aapt: ELF: not
found :CordovaLib:processDebugResources FAILED
從我看到我的理解,什麼是錯與AAPT文件,如果我刪除它,它拋出的錯誤,所以我不知道如何編輯AAPT文件
嘗試'離子平臺rm android'後跟'離子平臺添加android' – Chisko
我試過了,但它不起作用它仍然會拋出相同的錯誤 – lolname101
看起來你引用的是一個提供圖片或資源文件夾中的其他內容。 – Chisko