IONIC 3: Execution failed for task ':app:processDebugResources'

孤人 提交于 2019-12-21 07:28:31

问题


Execution failed for task ':app:processDebugResources'.

This error comes when execute "ionic cordova build android". Searched for a long time but no luck. Anyone can help?

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

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

* Get more help at https://help.gradle.org

BUILD FAILED in 4m 18s
(node:9516) [DEP0018] DeprecationWarning: Unhandled promise rejections are 
deprecated. In the future, promise rejections that are not handled will 
terminate the Node.js process with a non-zero exit code.`

回答1:


run into the same error. found this solution to fix it:

https://stackoverflow.com/a/49172982/7655348

Replace com.android.support:support-v4:+ with com.android.support:support-v4:27.1.0 in project.properties file under platform/android folder




回答2:


I know it's a very late answer, incase someone still facing this issues in 2019.

It's caused due to gradle, add this gradle support plugin and it should be fine:

cordova plugin add cordova-android-support-gradle-release



回答3:


Also this solution worked for me:

https://forum.ionicframework.com/t/failed-build-for-android-execution-failed-for-task-app-processdebugresources/124551/3

Go to platforms/android/app/src/main/res/values/strings.xml and add:

<string name="fb_app_id">YOUR_FB_APP_ID</string>
<string name="fb_app_name">YOUR_FB_APP_NAME</string>

Then I had to did cordova clean and ionic cordova build android




回答4:


Actually this is a android support problem. so first find out which android support library installed in your android sdk.

in my sdk com.android.support:support-v4:24.1.1+ so i replaced the code in project.properites file

cordova.system.library.1=com.android.support:support-v4:24.1.1+




回答5:


in the project folder try:

cordova clean
ionic cordova build <platform_name>



回答6:


Solution link

This is due to compat plugin. Remove that plugin if you have older version (less than 1.2.0) and set cordova-android@6.3.0

cordova plugin rm cordova-plugin-compat --force

cordova plugin add cordova-plugin-compat@1.2.0

cordova platform rm android

ionic cordova platform add android@6.3.0

Working at my case. Thanks :)




回答7:


I just solve this issue by removing this line of code cordova.system.library.15=com.android.support:support-v4:+ , and the path to the file is platforms/android/project.properties




回答8:


Visit project.properties in your Ionic project...that is platform/android/project.properties

and replace like below

Project target.

target=android-26
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.2=com.android.support:appcompat-v7:23+
cordova.gradle.include.1=cordova-plugin-telerik-imagepicker/multipurposetheme- 
ignorelinterrors.gradle
cordova.gradle.include.2=cordova-plugin-telerik-imagepicker/multipurposetheme- 
androidtarget.gradle
cordova.system.library.3=com.android.support:support-v4:27.1.0



回答9:


This problem occurred after i uninstall the Firebase plugin.

I tried alot of things but the simplest solution that i found was start a new project and replace the src folder with the new contents.



来源:https://stackoverflow.com/questions/48725618/ionic-3-execution-failed-for-task-appprocessdebugresources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!