Ionic Android Build失败了CordovaLib:processDebugResources [英] Ionic Android Build Fails CordovaLib:processDebugResources

查看:261
本文介绍了Ionic Android Build失败了CordovaLib:processDebugResources的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近想尝试离子并专门开发Android应用程序。我能够使用离子教程设置所有内容并通过localhost运行。我希望能够使用Android模拟器做同样的事情,但一直没有成功。我搜索并尝试了一切,但我仍然不确定如何解决下面的错误。所有代码都来自离子入门页面,其项目名为todo。如果有人可以帮我这个。非常感谢。我正在使用Ubuntu。以下是我的终端在运行ionic build android时给出的内容

I recently wanted to try out ionic and specifically develop android apps. I was able to set everything up using the ionic tutorial and run via localhost. I want to be able to do the same using the android emulator but have been unsuccessful. I have searched and tried everything but I am still not sure how to resolve the error below. All the code is from the ionic getting started page with their project called todo. If anyone could help me with this. it would be much appreciated. I am using Ubuntu. The following is what my terminal gives when I run "ionic build android"

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我收到以下错误:

Edit 1: I ran the following command suggested below: ./gradlew assembleDebug -info and I get the following error:

: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文件

From what I see I understand that something is wrong with the aapt file, If I remove it it throws errors, so I am not sure how to edit the aapt file

推荐答案

在同一期间花了好几个小时后,刚刚通过运行解决了问题一些更新:

After hours spent in the same issue, just solved the problem by running some updates:

npm update -g ionic cordova

此信息见: https ://forum.ionicframework.com/t/android-build-failed/32069

这篇关于Ionic Android Build失败了CordovaLib:processDebugResources的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆