Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'. > Failed to execute aapt


yay she works now, it is the maroun-background-location plugin that brought about the issue


this also worked for me. I also had to delete my /platforms/android/build directory to get past a DEX error.


I had the same problem.

I solved it change to version v4:26:




We fixed that problem adding a hook which applies a fix to the build.gradle


This worked for me too! Thanks.


Using this approach, adding this cordova hook fixed the issue.
Adds it always to the end of gradle file.


module.exports = function(ctx) {
  var fs = ctx.requireCordovaModule('fs'),
    path = ctx.requireCordovaModule('path'),
    xml = ctx.requireCordovaModule('cordova-common').xmlHelpers;
  var gradlePath = path.join(ctx.opts.projectRoot, 'platforms/android/build.gradle');
  var gradleAppendedText = '\nconfigurations.all {\nresolutionStrategy.force \'\'\n}';

  fs.readFile(gradlePath, function read(err, data) {
    if (err) {
      throw err;
    if(data.indexOf('') === -1){
      fs.appendFile(gradlePath, gradleAppendedText, function (err) {
        if (err) throw err;


Is there any documentation how to include this hook?

Thanks a lot :slight_smile:


I was looking for the same. Google gave me this, which works for me:


cordova-plugin-broadcaster was causing my problems.

Editing this plugin.xml line in the node_modules and plugin directory from
<framework src="" />
<framework src="" />
and adding the android platform allowed me to build again.


I had same problem, but it work now by changed ‘’ to ‘’ as you said.

I changed text in my '…platforms\android\phonegap-plugin-barcodescanner\my_project-barcodescanner.gradle

and then re-build by ionic cordova run android
it works. thank a lot.


This worked ! Thanks ! You gave me a great help.


problem find out: cordova-plugin-document-viewer

I have solved this problem. thank you so much.


Hello :slight_smile:

I have been working on this kind of error for days :disappointed_relieved:

The problem was the coexistence of cordova-plugin-crosswalk-webview and phonegap-plugin-push. They were using different versions of the library (and it looks like the last release of library breaks cordova builds).

I know that crosswalk webview is no longer maintained but it’s doing the job for now and I don’t want to remove it.

So I have updated my android studio and I have added cordova-android-support-gradle-release in my project (it chooses the right android support version for you :sunglasses:).

Now I am able to build releases like a charm :slight_smile:

I didn’t manage to build with cordova-android@6.4.0 (flavor issue, see this post to get ride of it :

I hope that will help some people !

My infos :

cli packages: (C:\Users\***\Documents\***\***\mobile-app\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2


    Android SDK Tools : 26.1.1
    Node              : v6.11.3
    npm               : 5.2.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\****\AppData\Local\Android\Sdk


    backend : pro

Peace :kissing_heart:


In order to prevent android support v28 from being used and to fix this issue I used:

cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.0.0

Writing in build.gradle did the trick too, but as platform/android is built dynamically I preferred the 1st solution.


For the life of me I swear… well. your tip saved me, thanks lol


thx bro, you save my life.


thanks man, you save my life !


This worked for me. But now my app needs up to 5 min to build.


Encontrou alguma solução Guilherme? Estou quebrando a cabeça com isso a semanas.


what will happen if i remove the platform from the existing app? will this cause any changes in the existing app?