21

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.`
Ansib Raza
  • 388
  • 2
  • 3
  • 11

9 Answers9

18

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
mike
  • 375
  • 2
  • 14
12

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

Flutterian
  • 1,761
  • 1
  • 21
  • 47
kaspaddy
  • 163
  • 8
  • This fixed my issue, I had multiple entries for 'com.android.support:support' in project.properties with mixed values. (Probably from different plugins) Setting them all to the most specific seemed to fix the error (24.1.1+ for me) – self.name Aug 14 '18 at 17:14
2

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

Javier
  • 31
  • 4
1

in the project folder try:

cordova clean
ionic cordova build <platform_name>
kenlukas
  • 3,616
  • 9
  • 25
  • 36
0

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 :)

Pranay Kumar
  • 144
  • 5
0

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+

Gunasekar
  • 145
  • 1
  • 6
0

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

f.c
  • 454
  • 1
  • 6
  • 14
0

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
-1

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.