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

Hi, I recently ran the command “ionic cordova run android” and gradle tried to download some dependecies:

Incremental java compilation is an incubating feature.
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

Download https://maven.google.com/com/android/support/support-compat/27.0.0/support-compat-27.0.0.pom

Download https://maven.google.com/com/android/support/support-media-compat/27.0.0/support-media-compat-27.0.0.pom

Download https://maven.google.com/com/android/support/support-core-utils/27.0.0/support-core-utils-27.0.0.pom

Download https://maven.google.com/com/android/support/support-core-ui/27.0.0/support-core-ui-27.0.0.pom

Download https://maven.google.com/com/android/support/support-fragment/27.0.0/support-fragment-27.0.0.pom

Download https://maven.google.com/com/android/support/support-annotations/27.0.0/support-annotations-27.0.0.pom

Download https://maven.google.com/com/android/support/support-annotations/27.0.0/support-annotations-27.0.0.jar

Download https://maven.google.com/com/android/support/support-compat/27.0.0/support-compat-27.0.0.aar

Download https://maven.google.com/com/android/support/support-media-compat/27.0.0/support-media-compat-27.0.0.aar

Download https://maven.google.com/com/android/support/support-core-utils/27.0.0/support-core-utils-27.0.0.aar

Download https://maven.google.com/com/android/support/support-core-ui/27.0.0/support-core-ui-27.0.0.aar

Download https://maven.google.com/com/android/support/support-fragment/27.0.0/support-fragment-27.0.0.aar

Download https://maven.google.com/com/android/support/support-v4/27.0.0/support-v4-27.0.0.aar

Download https://maven.google.com/com/android/support/customtabs/27.0.0/customtabs-27.0.0.aar

After that, at the end the build fails with this message:

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 ':processDebugResources'.
> 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.

[ERROR] An error occurred while running cordova run android (exit code 1).

I tried to find a solution but I didn’t find any post with this.
Any idea???

HELP PLEASE!

15 Likes

I have the same problem. Exactly 2 hours ago…

Same problem here, i lost my whole day with this, in fact i figured it out, but i have to upgrade to android-26, the problem of it is playstore rejects my update because my users can’t upgrade for my new version, how to solve this keeping android-25?

Same problem here. Do you know how to solve this issue ?

        :processDebugResourcesERROR: 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 ':processDebugResources'.
        > 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: 5.217 secs

We tried to update Cordova and change some dependencies but we still have the issue. Please HELP :sob:

3 Likes

i have same problem too… i have no idea how to fix it…

Same here, any ideas??

Mesmo problema aqui…

i’ve same problem… please help

Only occur today, maybe some update from Gradle that break our app.
@max Can you help us?

Please answer all these questions:

  1. Post your ionic info please.
  2. Post your ionic cordova requirements please.
  3. What Android Studio version do you have installed?
  4. Have you tried to remove and re-add the platform?
1 Like

Hi, here is my requirements, and I not yet re-install the platform by ionic cordova platform rm android.

Requirements check results for android:

Java JDK: installed 1.8.0

Android SDK: installed true

Android target: installed android-27,android-26,android-25

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

UPDATE: I try to reinstall the platform but meet this error

UP-TO-DATE
:compileArmv7DebugSources
:transformClassesWithDexForArmv7Debug
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForArmv7Debug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lorg/apache/cordova/BuildHelper;

* 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: 55.158 secs
Error: /Users/nampdn/Projects/mdds/mdds.vgm.player/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForArmv7Debug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lorg/apache/cordova/BuildHelper;

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Hi,

here is my info…
cli packages: (/Users/masamocevic/Desktop/Passarola - Android/node_modules)

@ionic/cli-utils  : 1.15.1
ionic (Ionic CLI) : 3.15.1

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 1.3.7
Cordova Platforms  : android 6.2.3 ios 4.4.0
Ionic Framework    : ionic-angular 3.2.1

System:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2 
Node              : v6.11.2
npm               : 5.3.0 
OS                : macOS Sierra
Xcode             : Xcode 8.3.3 Build version 8E3004b 

Environment Variables:

ANDROID_HOME : /Users/masamocevic/Library/Android/sdk

Misc:

backend : legacy
Requirements check results for android:

Java JDK: installed 1.8.0

Android SDK: installed true

Android target: installed android-26,android-25,android-23

Gradle: installed /Users/masamocevic/gradle/gradle-4.2/bin/gradle

Requirements check results for ios:

Apple OS X: installed darwin

Xcode: installed 8.3.3
ios-deploy: installed 1.9.2
CocoaPods: installed

Last night we didi android platform remove and platfor add.

Anyway, it doesn’t work and we have always the same error.

1 Like

You didn’t post your ionic info output.
You didn’t specify your Android Studio version.

The error you posted, when do you get that? Another build after re-adding the platform?

You didn’t post which Android Studio version you have installed.

Your “Android target” output doesn’t include android-27. Did you get the same output as @lalogrosz with “Download https…” or only the same error?

Sorry, Here is my info:
ionic info:


cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.15.1
    ionic (Ionic CLI) : 3.15.1

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.7.1

System:

    Android SDK Tools : 26.1.1
    Node              : v6.11.3
    npm               : 2.15.12
    OS                : macOS Sierra
    Xcode             : Xcode 9.0.1 Build version 9A1004

Environment Variables:

    ANDROID_HOME : /Users/nampdn/Library/Android/sdk

Misc:

    backend : pro

Android Studio version: 2.3.3

The error I meet is after reinstall the platform android.

Plus here is plugin list:

com.darktalker.cordova.screenshot 0.1.5 "Screenshot"
cordova-plugin-app-event 1.2.1 "Application Events"
cordova-plugin-apprate 1.3.0 "AppRate"
cordova-plugin-autostart 2.0.1 "Autostart"
cordova-plugin-background-mode 0.7.2 "BackgroundMode"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-crosswalk-webview 2.3.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-dialogs 1.3.3 "Notification"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-fullscreen 1.1.0 "cordova-plugin-fullscreen"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-globalization 1.0.7 "Globalization"
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin"
cordova-plugin-googleplus 5.1.1 "Google SignIn"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-market 1.2.0 "Market"
cordova-plugin-music-controls 2.0.0 "MusicControls"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-screen-orientation 2.0.2-dev "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.1.8 "SocialSharing"
de.appplant.cordova.plugin.local-notification 0.8.5 "LocalNotification"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-deeplinks 1.0.15 "Ionic Deeplink Plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
onesignal-cordova-plugin 2.2.0 "OneSignal Push Notifications"

Yes, my situation is the same as from lalogrosz. Last night we were working as usual and there was no problems, until the last build when we saw that gradle did some updates… After that we could not build any more with the error cannot find android fonts. ( the same thing lalogrosz descirbed ). We did androdi platform remove and android platform add - without errors, but when we try to build again the same error came out.

I dont know how to get Android Version info. Please, can you help me telling me how to do it?

@borisisaic: If you haven’t installed Android Studio, then you don’t have a version.

Can you create a new project with ionic start (use the blank template) and add the Android platform and try to build it?

If this doesn’t work:
Can you create a new Cordova project with cordova create, then add the Android platform with cordova platform add android and try to build with cordova build android --debug?

Post the output please.

(This is trying to check if Ionic is connected at all or if this is a Cordova issue)

Hi @Sujan12, with a newly created project.
I am able to add platform with no error, and very happy that it can build with and without plugin cordova-plugin-crosswalk-webview
P/s: I notice it uses cordova-android@6.3.0 instead of cordova-android@6.2.2

Well, I am a junior programmer and I am not sure if I can do the things you ask me. I will have to wait for senior programmer to try to do the things you described. Anyway, last night we try a lot of things, using options like --debug, etc… - and we also try to re-build another project that we already did in the past. But without success. The same error came up. So right now we cannot build any android project.