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

Same here.

cli packages: (/Users/dindigital02/.nvm/versions/node/v6.11.3/lib/node_modules)

    @ionic/cli-utils  : 1.15.2
    ionic (Ionic CLI) : 3.15.2

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    Cordova Platforms : android 6.2.3 ios 4.5.1
    Ionic Framework   : ionic1 1.3.3

System:

    ios-deploy : 1.9.2
    ios-sim    : 6.1.1
    Node       : v6.11.3
    npm        : 3.10.10
    OS         : macOS Sierra
    Xcode      : Xcode 9.0.1 Build version 9A1004

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : legacy

Thanks @nncl and @silvius for including your ionic info output.

Some more things that would help:

  1. Post your ionic cordova requirements output please.
  2. What Android Studio version do you have installed?
  3. Have you tried to remove and re-add the platform?
  4. What does your platforms/android/project.properties look like?
  5. What plugins is your project using (ionic cordova plugin list give you a list)

Hi @Sujan12

  1. Cordova requirements:
Requirements check results for android:

Java JDK: installed 1.8.0

Android SDK: installed true
Android target: installed android-26,android-25,android-16

Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-3.2/bin/gradle

Requirements check results for ios:
Apple macOS: installed darwin

Xcode: installed [object Object]
ios-deploy: installed [object Object]

CocoaPods: installed [object Object]
  1. Android Studio Version: 2.3.3

  2. I’ve tried re-add the platform


# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-25
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.2=com.android.support:support-v4:24.1.1+
cordova.system.library.3=com.onesignal:OneSignal:3.6.1
cordova.gradle.include.1=onesignal-cordova-plugin/br-build-extras-onesignal.gradle
cordova.system.library.4=com.google.android.gms:play-services-gcm:+
cordova.system.library.5=com.google.android.gms:play-services-location:+
cordova.system.library.6=com.android.support:support-v4:+
cordova.system.library.7=com.android.support:customtabs:+
  1. Plugins

cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-screen-orientation 2.0.1 "Screen Orientation"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-x-socialsharing 5.2.0 "SocialSharing"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
onesignal-cordova-plugin 2.2.0 "OneSignal Push Notifications"
1 Like

@Sujan12:
1.

> cordova requirements

Requirements check results for android:

Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25
Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle


Requirements check results for ios:

Apple macOS: installed darwin

Xcode: installed [object Object]

ios-deploy: not installed 

Cordova needs ios-deploy version 1.9.2 or greater, you have version 1.9.0. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'

CocoaPods: installed [object Object]
Error: Some of requirements check failed
  1. Android Studio 3.0
  2. Yes, for a 100 times
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.facebook.android:facebook-android-sdk:4.+
cordova.system.library.2=com.android.support:support-v4:+
cordova.system.library.3=com.onesignal:OneSignal:3.6.1
cordova.gradle.include.1=onesignal-cordova-plugin/tsd2020-build-extras-onesignal.gradle
cordova.system.library.4=com.google.android.gms:play-services-gcm:+
cordova.system.library.5=com.google.android.gms:play-services-location:+
cordova.system.library.6=com.android.support:support-v4:+
cordova.system.library.7=com.android.support:customtabs:+
> cordova plugin ls
✔ Running command - done!
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.4-dev "Cordova WKWebView Engine"
ionic-plugin-keyboard 2.2.1 "Keyboard"
onesignal-cordova-plugin 2.2.0 "OneSignal Push Notifications"
1 Like

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