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

I had the same problem.
This is related to cordova-plugin-mauron85-background-geolocation .

In file platforms\android\project.properties change
com.android.support:support-v4:+ version,
to com.android.support:support-v4:23.+ and you should be fine.

1 Like

hi there,
thank you, I saw that onesignal-cordova-plugin has got “com.android.support:support-v4:+” in a file, so I remove the plugin. Still the same issue:

:mergeArmv7DebugAssets UP-TO-DATE
:createXwalkCommandLineFileArmv7Debug
:generateArmv7DebugResValues UP-TO-DATE
:generateArmv7DebugResources UP-TO-DATE
:mergeArmv7DebugResources UP-TO-DATE
:processArmv7DebugManifest UP-TO-DATE
:processArmv7DebugResourcesERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: 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.

BUILD FAILED

Total time: 2.948 secs
Command finished with error code 1: /Users/xxxxxx/desktop/xxxxx/platforms/android/gradlew cdvBuildDebug,-b,/Users/xxxxxxxx/desktop/xxxxx/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true
Error: /Users/xxxxxxx/desktop/xxxxxx/platforms/android/gradlew: Command failed with exit code 1 Error output:
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: 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.

I remove and added the android platform multiple times… in my platforms\android\project.properties I have those:

target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:appcompat-v7:23+
cordova.gradle.include.1=com.toshyodev.imagepicker/xxxxxx-ignorelinterrors.gradle
cordova.gradle.include.2=com.toshyodev.imagepicker/xxxxxx-androidtarget.gradle
cordova.gradle.include.3=cordova-plugin-crosswalk-webview/xxxxxx-xwalk.gradle

is “com.android.support:appcompat-v7:23+” fine?
:-/

Htec, I changed that line, but it didn’t work for me! Do you have other suggest?

After removing few plugins, I found out that my problem comes from the image picker plugin.
I think the problem comes from references to different Android APIs:
This link might help you even if you don t use ImagePicker:

I have still not be able to find where to apply changes to make it work.
If you are more chance, please post it as a reply.

Thank you

That was my fix.
The only thing I can suggest is to check all your plugins.
Create new project with the same ionic setup as you have now.
Then just add plugins, one by one and check if your project build.

This is my current setup:

cli packages: (xxxxxxxxx)

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

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.8.0

System:

    Android SDK Tools : 25.2.5
    Node              : v6.9.4
    npm               : 5.4.2
    OS                : Windows 10

Hi,

I also had this problem and today I solved it with the following:

Hope these will also help for someone else as well :slight_smile:

1 Like

Htec thanks for your replay, I removed and reinstalled all plugins I had problems with 2(two):

  • phonegap-plugin-barcodescanner
  • cordova-plugin-mauron85-background-geolocation
  1. With the plugin phonegap-plugin-barcodescanner I changed the file
    XXXX–barcodescanner.gradle in line
    compile ‘com.android.support:support-v4:+’ to compile 'com.android.support:support-v4:23+'
    and it worked.

  2. But with cordova-plugin-mauron85-background-geolocation I’m still have troubles.

1 Like

Hi! I’m with this problem too.

I made every step described here, and still having problems to build.

I don’t have Android Studio, I’m using Android SDK Manager and my app doesn’t have compat plugin as described above.

Anyone with this scenario?

I had this problem after updating cordova-plugin-qrscanner and his ionic wrapper @ionic-native/qr-scanner

I solved removing plugins folder, removing and re-adding android platform.

Then it builded successfully

what can I do this happens to me when I remove and re-add the android platform, and my app stops working

Using cordova-fetch for cordova-android@~6.2.2
Adding android project…
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.azlogica.fuerzatrabajo
Name: Team_Manager
Activity: MainActivity
Android target: android-25
Subproject Path: CordovaLib
Android project created with cordova-android@6.2.3
Installing “com.neton.cordova.diagnostic” for android
Installing “cordova-android-play-services-gradle-release” for android
Subproject Path: CordovaLib
Installing “cordova-plugin-afnetworking” for android
cordova-android-play-services-gradle-release : WROTE C:\Users\ID_Andres-Castill
o\Desktop\tm\TeamManager\platforms\android\build.gradle > 11.+
Installing “cordova-plugin-backbutton” for android
Installing “cordova-plugin-background-mode” for android
android-sdk version check failed (“C:\Users\ID_Andres-Castillo\Desktop\tm\TeamMa
nager\platforms\android\cordova\android_sdk_version”), continuing anyways.
Plugin dependency “cordova-plugin-device@1.1.2” already fetched, using that vers
ion.
Installing “cordova-plugin-device” for android
Installing “cordova-plugin-barcodescanner” for android
Installing “cordova-plugin-battery-status” for android
Installing “cordova-plugin-camera” for android
Plugin dependency “cordova-plugin-compat@1.2.0” already fetched, using that vers
ion.
Installing “cordova-plugin-compat” for android
Plugin “cordova-plugin-compat” already installed on android. Making it top-level
.
Installing “cordova-plugin-console” for android
Plugin “cordova-plugin-device” already installed on android. Making it top-level
.
Installing “cordova-plugin-device-orientation” for android
Installing “cordova-plugin-dialogs” for android
Installing “cordova-plugin-fastrde-checkgps” for android
Failed to install ‘cordova-plugin-fastrde-checkgps’: CordovaError: Version of in
stalled plugin: “cordova-plugin-geolocation@2.2.0” does not satisfy dependency p
lugin requirement “cordova-plugin-geolocation@^1.0.1”. Try --force to use instal
led plugin as dependency.
at C:\Users\ID_Andres-Castillo\AppData\Roaming\npm\node_modules\cordova\node
_modules\cordova-lib\src\plugman\install.js:581:33
at _fulfilled (C:\Users\ID_Andres-Castillo\AppData\Roaming\npm\node_modules
cordova\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\ID_Andres-Castillo\AppData\Roaming\np
m\node_modules\cordova\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\ID_Andres-Castillo\AppData\Roam
ing\npm\node_modules\cordova\node_modules\q\q.js:749:13)
at C:\Users\ID_Andres-Castillo\AppData\Roaming\npm\node_modules\cordova\node
_modules\q\q.js:509:49
at flush (C:\Users\ID_Andres-Castillo\AppData\Roaming\npm\node_modules\cordo
va\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Error: Version of installed plugin: “cordova-plugin-geolocation@2.2.0” does not
satisfy dependency plugin requirement “cordova-plugin-geolocation@^1.0.1”. Try -
-force to use installed plugin as dependency.

Man if your problem are not the same as the other people, please be smart and create another post in the forum so others can help you with your specific problem and the other that does not have anything related with your SPECIFIC problem, will not be notified… Thanks

hi i had tried this kind of issue
what i did was i install again the latest version of ionic cordova
then remove the current platform in my app
then update my dependencies
then install another platform android/ios

then run
i hope this will help you bro.

For me everything mentioned above didn’t work. I finally downgraded to cordova-android 6.2.3. Strange enough ony another machine, everything worked fine one day ago with cordova-android 6.3.0. Really sucks.

hello … if I worked thanks :smile:

Glad, I could help. But still this ain’t a good solution since sometime we must upgrade :cold_sweat:

finally this works for me! thanks @silvius

1 Like

Thanks yoojene, it worked form me!

1 Like

Ah, finally (this must be the word most often used in this thread :wink: ) I got it running. Seems to have something to do with the android libs. In Android Studio I removed all API Levels but 26. Now it works like a charm :slight_smile:

Thanks a lot, I just update my android version to 6.3.0 then error solved.
Thank you very much!

this was solved my problem, thx!

1 Like