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


#103

I haved the same error, and i fixed the problem by changing version my nodes modules, my plugin cordova, version off android studio and many other stuff:

My conf below:

ANDROID STUDIO: 3.0.0

IONIC INFO :

@ionic/cli-utils  : 1.13.1
ionic (Ionic CLI) : 3.13.2

global packages:

cordova (Cordova CLI) : not installed

local packages:

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

System:

Node : v6.11.0
npm  : 5.5.1
OS   : Windows 7

Misc:

backend : pro

PACKAGE.JSON :


 "dependencies": {
    "@angular/common": "4.4.3",
    "@angular/compiler": "4.4.3",
    "@angular/compiler-cli": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@ionic-native/action-sheet": "4.3.1",
    "@ionic-native/calendar": "4.3.1",
    "@ionic-native/call-number": "4.3.2",
    "@ionic-native/camera": "4.3.1",
    "@ionic-native/core": "4.3.1",
    "@ionic-native/fcm": "4.3.1",
    "@ionic-native/file": "4.3.1",
    "@ionic-native/file-transfer": "4.3.1",
    "@ionic-native/geolocation": "4.3.1",
    "@ionic-native/globalization": "4.3.1",
    "@ionic-native/google-maps": "4.3.1",
    "@ionic-native/ibeacon": "4.3.1",
    "@ionic-native/launch-navigator": "4.3.1",
    "@ionic-native/local-notifications": "4.3.1",
    "@ionic-native/network": "4.3.2",
    "@ionic-native/open-native-settings": "4.3.1",
    "@ionic-native/splash-screen": "4.3.1",
    "@ionic-native/status-bar": "4.3.1",
    "@ionic/storage": "2.0.1",
    "@types/node": "8.0.33",
    "com.unarin.cordova.beacon": "^3.4.0",
    "cordova-android": "^6.3.0",
    "cordova-ios": "~4.3.1",
    "cordova-open-native-settings": "^1.4.1",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-android-permissions": "^0.11.0",
    "cordova-plugin-app-event": "^1.2.1",
    "cordova-plugin-browsertab": "^0.2.0",
    "cordova-plugin-buildinfo": "^1.1.0",
    "cordova-plugin-calendar": "^4.6.0",
    "cordova-plugin-camera": "^2.4.1",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-console": "^1.0.7",
    "cordova-plugin-customurlscheme": "^4.3.0",
    "cordova-plugin-device": "^1.1.6",
    "cordova-plugin-dialogs": "^1.3.3",
    "cordova-plugin-fcm": "^2.1.2",
    "cordova-plugin-file": "^4.3.3",
    "cordova-plugin-file-transfer": "^1.6.3",
    "cordova-plugin-geolocation": "^2.4.3",
    "cordova-plugin-globalization": "^1.0.7",
    "cordova-plugin-googlemaps": "^2.0.0",
    "cordova-plugin-inappbrowser": "^1.7.1",
    "cordova-plugin-ionic-webview": "^1.1.16",
    "cordova-plugin-network-information": "^1.3.3",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-sqlite-2": "^1.0.4",
    "cordova-plugin-statusbar": "^2.2.3",
    "cordova-plugin-whitelist": "^1.3.2",
    "cordova-universal-links-plugin": "^1.2.1",
    "de.appplant.cordova.plugin.local-notification": "^0.8.5",
    "firebase": "4.3.0",
    "font-awesome": "4.7.0",
    "ionic-angular": "3.7.1",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "mx.ferreyra.callnumber": "~0.0.2",
    "node-js-marker-clusterer": "^1.0.0",
    "p-queue": "2.2.0",
    "pouchdb": "6.2.0",
    "pouchdb-adapter-cordova-sqlite": "2.0.2",
    "pouchdb-adapter-websql-core": "6.2.0",
    "pouchdb-browser": "6.2.0",
    "pouchdb-core": "6.2.0",
    "promise-polyfill": "6.0.2",
    "rxjs": "5.4.3",
    "shortid": "2.2.8",
    "sw-toolbox": "3.6.0",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.0.7",
    "uuid": "^3.1.0",
    "zone.js": "0.8.18"
},
"devDependencies": {
    "@ionic/app-scripts": "3.0.0",
    "typescript": "2.3.4"
}

CONFIG.XML

    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="ShowSplashScreenSpinner" value="true" />
    <preference name="FadeSplashScreen" value="true" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="AndroidLaunchMode" value="singleTask" />
    <feature name="StatusBar">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" />
    <universal-links>
        <ios-team-id value="YOUR_TEAM_ID" />
        <host name="YOUR_DYNAMIC_LINK" scheme="https" />
        <host name="YOUR_URL" scheme="https">
            <path url="/__/auth/callback" />
        </host>
    </universal-links>
    <allow-navigation href="http://localhost:8080/*" />
    <feature name="CDVWKWebViewEngine">
        <param name="ios-package" value="CDVWKWebViewEngine" />
    </feature>
    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="orientation" value="portrait" />
    <engine name="ios" spec="~4.3.1" />
    <engine name="android" spec="^6.3.0" />
    <plugin name="cordova-plugin-console" spec="^1.0.7" />
    <plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
    <plugin name="cordova-plugin-android-permissions" spec="^0.11.0" />
    <plugin name="cordova-plugin-globalization" spec="^1.0.7" />
    <plugin name="de.appplant.cordova.plugin.local-notification" spec="^0.8.5" />
    <plugin name="cordova-plugin-app-event" spec="^1.2.1" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
    <plugin name="cordova-plugin-sqlite-2" spec="^1.0.4" />
    <plugin name="com.unarin.cordova.beacon" spec="^3.4.0">
        <variable name="NSBLUETOOTHPERIPHERALUSAGEDESCRIPTION" value="Give you access to iBeacons deployed in your city" />
    </plugin>
    <plugin name="cordova-plugin-actionsheet" spec="^2.3.3" />
    <plugin name="cordova-plugin-camera" spec="^2.4.1">
        <variable name="CAMERA_USAGE_DESCRIPTION" value=" " />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="This app need access to your photo library if you prefer use your own photo when submitting new POIs" />
    </plugin>
    <plugin name="cordova-plugin-device" spec="^1.1.6" />
    <plugin name="cordova-plugin-file" spec="^4.3.3" />
    <plugin name="cordova-plugin-file-transfer" spec="^1.6.3" />
    <plugin name="cordova-plugin-geolocation" spec="^2.4.3">
        <variable name="GEOLOCATION_USAGE_DESCRIPTION" value="This app would like to get your position to calculate distances from POIs around you" />
    </plugin>
    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
    <plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^4.0.7">
        <variable name="LOCATION_USAGE_DESCRIPTION" value="This app requires access to your location for navigation purposes" />
    </plugin>
    <plugin name="cordova-plugin-buildinfo" spec="^1.1.0" />
    <plugin name="cordova-universal-links-plugin" spec="^1.2.1" />
    <plugin name="cordova-plugin-browsertab" spec="^0.2.0" />
    <plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
    <plugin name="cordova-plugin-customurlscheme" spec="^4.3.0">
        <variable name="URL_SCHEME" value="YOUR_URL_SCHEME" />
        <variable name="ANDROID_SCHEME" value="" />
        <variable name="ANDROID_HOST" value=" " />
        <variable name="ANDROID_PATHPREFIX" value="/" />
    </plugin>
    <plugin name="cordova-plugin-calendar" spec="^4.6.0">
        <variable name="CALENDAR_USAGE_DESCRIPTION" value="This app uses your calendar" />
    </plugin>
    <plugin name="cordova-plugin-fcm" spec="^2.1.2" />
    <plugin name="mx.ferreyra.callnumber" spec="~0.0.2" />
    <plugin name="cordova-plugin-googlemaps" spec="^2.0.0">
        <variable name="API_KEY_FOR_ANDROID" value="YOUR_API_KEY" />
        <variable name="API_KEY_FOR_IOS" value="YOUR_API_KEY" />
        <variable name="LOCATION_WHEN_IN_USE_DESCRIPTION" value="Show your location on the map" />
        <variable name="LOCATION_ALWAYS_USAGE_DESCRIPTION" value="Trace your location on the map" />
    </plugin>
    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
    <plugin name="cordova-open-native-settings" spec="^1.4.1" />
    <plugin name="cordova-plugin-network-information" spec="^1.3.3" />

BUILD.GRADLE :

apply plugin: 'com.android.application'

buildscript {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }

    // Switch the Android Gradle plugin version requirement depending on the
    // installed version of Gradle. This dependency is documented at
    // http://tools.android.com/tech-docs/new-build-system/version-compatibility
    // and https://issues.apache.org/jira/browse/CB-8143
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'com.google.gms:google-services:3.1.1' // google-services plugin
    }
}

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.14.1'
}



...
...
...  
...
...




apply plugin: 'com.google.gms.google-services'

Gradle version : 3.3
com.google.android.gms:play-services:11.4.2

Some times node module and cordova plugin gets himself wrong, so you do delete manually in the folder.
Don’t forget to remove and add cordova plugin when you update it.

Try to go in android studio => files => project structure => project =>ok
Normally android studio should synchonize your gradle

I spent my whole day yesterday before succeeding to rebuilder my application.

I hope I can help you. Keep going !


#104

Same error as other else.

    @ionic/cli-utils  : 1.13.1
    ionic (Ionic CLI) : 3.13.2

global packages:

    cordova (Cordova CLI) : 7.0.1 

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 6.2.3 browser 4.1.0 ios 4.4.0
    Ionic Framework    : ionic-angular 3.8.0

System:

    Android SDK Tools : 25.2.5
    ios-deploy        : 1.9.1 
    Node              : v6.7.0
    npm               : 3.10.8 
    OS                : macOS Sierra
    Xcode             : Xcode 8.3.3 Build version 8E3004b 

Misc:

    backend : pro

My cordova-android: 6.2.3

But the strange thing is that 6.2.3 has work before!
So there is something else that has been triggered the error.


#105

this works for me: https://stackoverflow.com/a/46778377/8508648

dont forget remove platform, add cordova plugin add cordova-plugin-compat@1.2, then add platform with android@6.2.3


#106

Hi all,
I have been on this problem almost the whole day, and it is still present for me.
I try everything on this page, including:

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

I removed the plugins that do use this plugin (namely camera, file-transfer/file, save-image plugins).
I removed the mention of “cordova-plugin-compat” in fetch.json (not present in android.json). The only mentions are now in the files of the plugin itself, the package.json file, and on iOS platform files…

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

	at build_hus9r6wj3p7ssocwjvokp42z.run(/Users/xxxxxxx/Desktop/xxxxxxxx/platforms/android/build.gradle:145)
org.xwalk:xwalk_core_library:23+
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.

Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.

:preBuild
 
UP-TO-DATE
:preArmv7DebugBuild
 UP-TO-DATE
:checkArmv7DebugManifest

:preArmv7ReleaseBuild
 UP-TO-DATE
:preX86DebugBuild
 UP-TO-DATE
:preX86ReleaseBuild
 UP-TO-DATE
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest

:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
 UP-TO-DATE
:CordovaLib:compileDebugNdk
 UP-TO-DATE
:CordovaLib:compileLint
 UP-TO-DATE
:CordovaLib:copyDebugLint
 UP-TO-DATE
:CordovaLib:mergeDebugShaders
 UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets
 UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript
 UP-TO-DATE
:CordovaLib:compileDebugRenderscript
 
UP-TO-DATE
:CordovaLib:generateDebugResValues
 UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources
 UP-TO-DATE
:CordovaLib:processDebugManifest
 UP-TO-DATE
:CordovaLib:generateDebugBuildConfig
 UP-TO-DATE
:CordovaLib:processDebugResources
 UP-TO-DATE
:CordovaLib:generateDebugSources 
UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard
 UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
 UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
 UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders
 UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
 UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug
 UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
 UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:copyReleaseLint
 UP-TO-DATE
:CordovaLib:mergeReleaseShaders
 UP-TO-DATE
:CordovaLib:compileReleaseShaders
 UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles
 UP-TO-DATE
:CordovaLib:packageReleaseRenderscript
 
UP-TO-DATE
:CordovaLib:compileReleaseRenderscript UP-TO-DATE
:CordovaLib:generateReleaseResValues
 UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources
 UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig
 UP-TO-DATE
:CordovaLib:processReleaseResources
 UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
 UP-TO-DATE
:CordovaLib:compileReleaseJavaWithJavac
 UP-TO-DATE
:CordovaLib:processReleaseJavaRes
 UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
 UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
 UP-TO-DATE
:CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
 UP-TO-DATE
:CordovaLib:bundleRelease UP-TO-DATE
:prepareAndroidArchLifecycleRuntime100Library
 UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE
:prepareComAndroidSupportAppcompatV72340Library
 UP-TO-DATE

:prepareComAndroidSupportCustomtabs2700Library UP-TO-DATE
:prepareComAndroidSupportExifinterface2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2700Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2700Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2700Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2700Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2700Library UP-TO-DATE
:prepareComAndroidSupportSupportV42700Library UP-TO-DATE
:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase1142Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1142Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement1142Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1142Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGcm1142Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGcmLicense1142Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesIid1142Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesIidLicense1142Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesLocation1142Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesLocationLicense1142Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasks1142Library
 UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1142Library
 UP-TO-DATE
:prepareComOnesignalOneSignal361Library
 UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib630DebugLibrary
 UP-TO-DATE
:prepareOrgXwalkXwalk_core_library23535894Library
 UP-TO-DATE

:prepareArmv7DebugDependencies
:compileArmv7DebugAidl
 UP-TO-DATE
:compileArmv7DebugRenderscript
 UP-TO-DATE
:generateArmv7DebugBuildConfig
 UP-TO-DATE
:mergeArmv7DebugShaders
 UP-TO-DATE
:compileArmv7DebugShaders
 UP-TO-DATE
:generateArmv7DebugAssets UP-TO-DATE
:mergeArmv7DebugAssets
 UP-TO-DATE
:createXwalkCommandLineFileArmv7Debug

:generateArmv7DebugResValues
 UP-TO-DATE
:generateArmv7DebugResources UP-TO-DATE
:mergeArmv7DebugResources
 UP-TO-DATE
:processArmv7DebugManifest
 UP-TO-DATE
:processArmv7DebugResources
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

 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: 4.041 secs
Error: /Users/xxxxxxx/desktop/xxxxxxx/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.

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

here is my ionic info:

cli packages: (/Users/xxxxxxx/Desktop/xxxxx/node_modules)

    @ionic/cli-utils  : 1.13.1
    ionic (Ionic CLI) : 3.13.1

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 1.3.7
    Cordova Platforms  : android 6.3.0 ios 4.3.1
    Ionic Framework    : ionic-angular 3.3.0

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.1 
    ios-sim           : 5.0.8 
    Node              : v6.11.5
    npm               : 5.5.1 
    OS                : macOS Sierra
    Xcode             : Xcode 8.3.3 Build version 8E3004b 

Misc:

    backend : legacy


If somebody in my case found a solution, please let me know.


#107

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.


#108

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?
:-/


#109

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


#110

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


#111

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

#112

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:


#113

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.


#114

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?


#115

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


#116

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.


#117

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


#118

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.


#119

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.


#120

hello … if I worked thanks :smile:


#121

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


#122

finally this works for me! thanks @silvius