Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt


#154

problem find out: cordova-plugin-document-viewer

I have solved this problem. thank you so much.


#155

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 com.android.support:support library (and it looks like the last release of android.support 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 : https://stackoverflow.com/questions/47413647/ionic-android-build-error-all-flavors-must-now-belong-to-a-named-flavor-dimen)

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

System:

    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

Misc:

    backend : pro

Peace :kissing_heart:


#156

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.


#157

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


#158

thx bro, you save my life.


#159

thanks man, you save my life !


#160

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


#161

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


#162

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


#163

what will happen if i remove the platform from the existing app?


#164

Believe not, I tried it in so many ways but the only thing that worked for me was these steps. In any cases if you need to have an plugin with appsupport it will fail your build.


#165

big thanks!! solved the issue by these steps… cheers : :clinking_glasses:


#166

And also verify if your project.properties inside platforms > android is with cordova.system.library.1=com.android.support:support-v4:23+

Just changing cordova-plugin-file-opener2 in plugin.xml didn’t work.


#167

If you are using cordova-plugin-file-opener2 try this solution: https://github.com/pwlin/cordova-plugin-file-opener2/issues/202

Just remove the old plugin and add this instead cordova plugin add https://github.com/JuanjoPP/cordova-plugin-file-opener2. Then reinstall your platforms by removing them and adding them again.

This should work without editing properties or xml files.


#168

Thank you so much, error solved!


#169

I still can’t figure out why I’m getting this problem.
I remove android and add it again. For some reason it wants to install 6.2.2 but then shows 6.2.3 in config.

I removed the file-opener2 plugin, I can build just fine. I try to add in the JuanjoPP still same error.
Add fileopen 2 plugin back in.
in the plugin.xml

In project.properties it has the same thing.

I tell it to build with android 6.3.0 No change.
I don’t know what else to try.


#170

Add this plugin it will work

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


#171

It works… :grinning:
Thanks!


#172

I fixed the issue by removing multiple libraries in ./android/project.properties “com.android.support:support-v4” and putting this “com.android.support:support-v4:27+”


#173