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

in my case it is with Cordova 7.0.1 and my android is 2.2.3. This happened to me this morning I gave a cordova compile android and I downloaded several things like those that are mentioned in the beginning of the forum
"Download https://maven.google.com/com/android/support/support-v4/27.0.0/support-v4-27.0.0.pom
Download https://maven.google.com/com/android/support/customtabs/27.0.0/customtabs-27.0.0.pom "
etc.

  • Already try removing and adding the android platform. I get the same result

  • my installed plugins are:

com.neton.cordova.diagnostic 0.2.3 "Diagnostic"
cordova-android-play-services-gradle-release 1.1.1 "cordova-android-play-service
s-gradle-release"
cordova-plugin-afnetworking 2.5.2 "AFNetworking Cordova Plugin"
cordova-plugin-backbutton 0.3.0 "Backbutton"
cordova-plugin-background-mode 0.7.2 "BackgroundMode"
cordova-plugin-barcodescanner 0.7.0 "BarcodeScanner"
cordova-plugin-battery-status 1.1.2 "Battery"
cordova-plugin-camera 2.2.0 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-device-orientation 1.0.3 "Device Orientation"
cordova-plugin-dialogs 1.2.1 "Notification"
cordova-plugin-fastrde-checkgps 0.9.9 "checkGPS"
cordova-plugin-file 4.2.0 "File"
cordova-plugin-file-transfer 1.5.1 "File Transfer"
cordova-plugin-geolocation 2.2.0 "Geolocation"
cordova-plugin-globalization 1.0.3 "Globalization"
cordova-plugin-google-analytics 1.6.0 "Google Universal Analytics Plugin"
cordova-plugin-image-picker 1.1.1 "ImagePicker"
cordova-plugin-media-capture 1.3.0 "Capture"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-printer 0.7.2 "Printer"
cordova-plugin-screen-orientation 1.4.2 "Screen Orientation"
cordova-plugin-uniquedeviceid 1.3.2 "UniqueDeviceID"
cordova-plugin-whitelist 1.2.2 "Whitelist"
de.appplant.cordova.plugin.email-composer 0.8.3 "EmailComposer"
es.keensoft.fullscreenimage 1.0.1 "Full Screen Image"
org.flybuy.cordova.background-location-services 1.1.1 "CDVBackgroundLocationServ
ices"
phonegap-plugin-barcodescanner 6.0.6 "BarcodeScanner"
phonegap-plugin-push 1.8.0 “PushPlugin”

1 Like

That unfortunately probably won’t work at all for some more time: Google released Android Studio 3.0, you should probably NOT upgrade yet (as Cordova is not ready yet but working on it)

But both @silvius and @nncl have something like this here in their project.properties:

Since the API 27 release yesterday this downloads a version that doesn’t work…

So I think @leonardoss is right in what he wrote above: Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt - #64 by leonardoss

Some plugin is including too new stuff, which makes Gradle download it and then can’t build.

Can you check your plugins which one does that?

1 Like

Hi guys… I’ve finally resolve this problem…
in my case, I updated my sdk manager (include some API`S)

run the command: “npm install -g ionic cordova”;

remove the platform: “ionic cordova rm platform android”;

remove the plugin compact “ionic cordova plugin rm cordova-plugin-compat --force”;

and add the platform this way: “ionic cordova platform add android@6.3.0”;

and everything is good again!

4 Likes

I was having same issues with the 2.x version. I upgraded because of the build problem…

PS: “You’re replying too quickly. Please wait x minutes before trying again.” is annoying

1 Like

It was already solved by @yoojene, just need to update sdk to android-26 and then remove any mention to cordova-plugin-compat in plugins/android.json and plugins/fetch.json, by some reason it is not removed by plugin remove command I believe that because geolocation and file plugins require compat plugin, as compat is already included in cordova-android@6.3.0, file and geolocation plugin are not affected.

1 Like

Hm, that gives me another idea you all can try:
npm install cordova-plugin-compat@1.2.0

You all have this plugin.

From the README of the plugin:

This plugin is no longer being worked on as the functionality provided by this plugin is now included in cordova-android 6.3.0. You should upgrade your application to use version 1.2.0 of this plugin. It will detect whether or not the plugin is required based on the version of cordova-android your app uses.

It is all related to support-v4@27.0.0 and cordova-android@6.2.3 (that was my version) and the cordova-plugin-compat@1.2.0

By upgrading to cordova-android@6.3.0 and removing cordova-plugin-compat.

cordova plugin rm cordova-plugin-compat --force
cordova platform rm android
ionic cordova platform add android@6.3.0

if you face an issue about PermissionHelper, check if cordova-plugin-compat and his mentions in plugins/android.json and plugins/fetch.json are removed and it will solve permission problem.

Thanks to anyone that was involved to find a workaround for that, thanks @Sujan12 :wink:

11 Likes

Amigos todo esto se soluciona con la actualización de nodejs 7 que aparecio y la actualizacion de ionic.

Saludos.

you are my hero :joy:

I have installed API 27, repeat the steps

cordova plugin rm cordova-plugin-compat --force
cordova plugin add cordova-plugin-compat@1.2
cordova platform rm android
cordova platform add android@6.3.0

but nothing :frowning:

2 Likes

This is the problem I mentioned, did you checked plugins/android.json and plugins/fetch.json??? Maybe compat stiil in these files. Please check and then try again.

Thank you, @leonardoss but:

android.json . In “installed_plugins”, I have deleted the block:

 {
    "cordova-plugin-compat": {
      "PACKAGE_NAME": "ro.tsd.tsd2020"
    },

and fetch.json

  "cordova-plugin-compat": {
    "source": {
      "type": "registry",
      "id": "cordova-plugin-compat@1.2"
    },
    "is_top_level": true,
    "variables": {}
  },

Did the steps:

cordova plugin rm cordova-plugin-compat --force
cordova platform rm android
cordova platform add android@6.3.0

At the end of the android.json appears the block:

"dependent_plugins": {
    "cordova-plugin-compat": {
      "PACKAGE_NAME": "com.appname.bla"
    }
  }

Deleted

 "cordova-plugin-compat": {
      "PACKAGE_NAME": "ro.tsd.tsd2020"
    }

And same error…

Check android.json inside platforms/android I found a mention to compat here too

I solved this issue by updating cordova and ionic to their @latest versions:

sudo npm install ionic@latest -g
sudo npm install cordova@latest -g

I started with a clean project (with no plugins/ folder in it) and it worked.

2 Likes

a fresh new installation app always worked, this issue is only for old created apps.

1 Like

Nothing… :frowning:

BUT

FINALLY I found the issue:
The plugin cordova-plugin-compat weren’t removed or updated on version 1.2 and after I found that is the old version in the release notes, I did a hard delete:
rm -rf plugins/cordova-plugin-compat
and installed the 1.2 version which works:
cordova plugin add cordova-plugin-compat@1.2

Thank you all for your support! Glad to be a member of this community :slight_smile:

5 Likes

I still don’t really understand what the issue is or where it comes from.

It has to do with the support library 27 being loaded.
It has to do with the compat plugin being installed/outdated.

What is loading the wrong support library?
How is the compat plugin connected to that?

I think it was from the compat plugin. I will try tomorrow to make some tests (uninstall API 27) and get the answer. I think. Haha.

LE: Uploaded the app to play and target SDK seems to be 26.

1 Like

hello … look at me or I have the library 27 and I have that problem and so far I have not been able to solve it. what I have is the plugin compat