Build Error - Ion Cordoba not working for Android

I get the following error when running the "ionic cordova build android --stacktrace" command:

:generateDebugResources
:mergeDebugResources

:processDebugManifest

:processDebugResources
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
 FAILED
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

I am using following tools on Window's:
 Editor : VScode

Ionic: C:\Users\xyz>ionic -version
3.19.1
Npm as packagemanager

Project Properties:

target=android-26
cordova.system.library.1=com.google.android.gms:play-services-analytics:+
cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.+
cordova.gradle.include.1=cordova-plugin-appsflyer-sdk/customerapp-cordovaAF.gradle
cordova.gradle.include.2=twitter-connect-plugin/customerapp-twitter.gradle
cordova.system.library.3=com.android.support:support-v4:26.+
cordova.system.library.4=com.android.support:appcompat-v7:26.+
cordova.system.library.5=com.android.support:support-v4:24.1.1+
cordova.system.library.6=com.android.support:support-v4:+
android.library.reference.1=CordovaLib
+6
source share
8 answers

I needed to complete both answers above:

On the platforms / android / phonegap -plugin-barcodescanner :

Find compile 'com.android.support:support-v4:+and replace for compile 'com.android.support:support-v4:27+'.

On / android platforms :

Locate cordova.system.library.2=com.android.support:support-v4:+and replace with cordova.system.library.2=com.android.support:support-v4:27.1.0.

Hope this helps.

+9
source

, , de.appplant.cordova.plugin.local-notification. 'com.android.support:support-v4:+ ' com.android.support:support-v4:23+, Android, . '}' build-extras.gradle, .

+3

https://forum.ionicframework.com/t/android-build-broken-after-gradle-dependencies-update-execution-failed-for-task-processdebugresources-com-android-ide-common-process-processexception-failed-to-execute-aapt/109982/134 , , " , cordova-plugin-file-opener2.
com.android.support:support-v4:+ com.android.support:support-v4:23+ plugin.xml cordova-plugin-file-opener2 node_modules.
project.properties in platforms/android.
, , -, , project.properties .

+2

-. , , 'com.android.support:support-v4: +' 'com.android.support:support-v4:27 +' '/android/phonegap-plugin-barcodescanner/{projectName} -barcodescanner', , , - , , 24 , ...

+2

, :

  • multiDexEnabled android → defaultConfig build.gradle
    • " \platform\android\app\build.gradle"
    • multiDexEnabled true
  • "com.android.support" build.gradle
    • com.android.support:support-v4:+ = > com.android.support:support-v4:23 +
  • "plugins.xml" :
    • com.android.support:support-v4:+ = > com.android.support:support-v4:23 +
  • project.properties "platform\android\project.properties"
    • cordova.system.library.4 = com.android.support: -v4: 23 +
  • " "

dex

/

.

android {

    defaultConfig {
        multiDexEnabled true
        versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
        applicationId privateHelpers.extractStringFromManifest("package")

        if (cdvMinSdkVersion != null) {
            minSdkVersion cdvMinSdkVersion
        }
    }
}
+1

"com.android.support:support-v4:+" , ,

/Android/PhoneGap-plugin- barcodescanner.gradle

barcodescanner, .   "com.android.support:support-v4:27+", .

, , ... , . , .

0

. , , , , , , @cpro90. , .

, ---webview-. Github , , 520 .

@UNUMObile build.gradle :

    configurations.all {
       resolutionStrategy.force 'com.android.support:support-v4:24.0.0'
    }

, "com.android.support:support-4:<28. 28, , .

, - .

0
source

Replacing 'com.android.support:support-v4: +' and 'com.android.support:support-v4:27 +' with fixed versions in plugin.xml did not work for us - the Trojan crosswalk updated at least one support library to version 28.0.0-alpha1 .

Forcing a fixed version of the support library for each dependency can solve the problem at the end.

configurations.all {
resolutionStrategy {
    eachDependency { DependencyResolveDetails details ->
        if (details.requested.group == 'com.android.support') {
            details.useVersion "27.1.0"
        }
    }
}
0
source

All Articles