Reputation: 598
I am trying to build an app in cordova. Everything was working fine till last few days. But now build is failing continuously.
The error is
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex
I tried all the possible methods mentioned in stackoverflow. I cross checked all the plugin.xml file and made changes for the app compat version not to use 28. Removed and added platforms several times. Did cleaning the cordova project. Manually edited project.properties. But so far no luck.
Here is my project.properties file.
target=android-26
android.library.reference.1=CordovaLib
cordova.gradle.include.1=cordova-plugin-extension/rml-rjfun-libs.gradle
cordova.system.library.1=com.google.firebase:firebase-ads:11.0.1
cordova.system.library.2=com.android.support:support-v4:24.1.1+
cordova.system.library.3=com.facebook.android:facebook-android-sdk:4.14.+
cordova.system.library.4=com.google.android.gms:play-services-maps:11.0.1
cordova.system.library.5=com.google.android.gms:play-services-location:11.0.1
cordova.system.library.6=com.android.support:support-v4:24.1.1+
cordova.system.library.7=com.android.support:support-v4:27.1.0
cordova.system.library.8=com.android.support:appcompat-v7:26.1.0
cordova.gradle.include.2=phonegap-plugin-barcodescanner/rml-barcodescanner.gradle
cordova.system.library.9=com.android.support:support-v13:26.+
cordova.system.library.10=me.leolin:ShortcutBadger:1.1.17@aar
cordova.system.library.11=com.google.firebase:firebase-messaging:11.0.1
cordova.gradle.include.3=phonegap-plugin-push/rml-push.gradle
My plugin list
cordova-custom-config 2.0.3 "cordova-custom-config"
cordova-plugin-admobpro-firebase 2.29.23 "AdMob Plugin Pro"
cordova-plugin-apprate 1.1.7 "AppRate"
cordova-plugin-camera 2.3.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-extension 1.5.4 "Cordova Plugin Extension"
cordova-plugin-facebook4 1.7.4 "Facebook Connect"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-transfer 1.5.1 "File Transfer"
cordova-plugin-geolocation 2.3.0 "Geolocation"
cordova-plugin-globalization 1.0.7 "Globalization"
cordova-plugin-googlemaps 1.4.5 "cordova-googlemaps-plugin"
cordova-plugin-inappbrowser 2.0.1 "InAppBrowser"
cordova-plugin-network-information 1.2.1 "Network Information"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 1.0.1 "StatusBar"
cordova-plugin-whitelist 1.0.0 "Whitelist"
cordova-plugin-x-socialsharing 5.1.8 "SocialSharing"
cordova-plugin-x-toast 2.3.2 "Toast"
cordova.plugins.diagnostic 3.1.7 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 1.0.9 "Keyboard"
phonegap-plugin-barcodescanner 6.0.8 "BarcodeScanner"
phonegap-plugin-push 2.1.2 "PushPlugin"
Please help me. I am stuck with the build.
Update 1
build.gradle file dependencies
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile(project(path: "CordovaLib", configuration: "debug"))
releaseCompile(project(path: "CordovaLib", configuration: "release"))
compile "com.google.firebase:firebase-ads:11.0.1"
compile "com.android.support:support-v4:24.1.1+"
compile "com.facebook.android:facebook-android-sdk:4.14.+"
compile "com.google.android.gms:play-services-maps:11.0.1"
compile "com.google.android.gms:play-services-location:11.0.1"
compile "com.android.support:support-v4:27.1.0"
compile "com.android.support:appcompat-v7:26.1.0"
compile "com.android.support:support-v13:26.+"
compile "me.leolin:ShortcutBadger:1.1.17@aar"
compile "com.google.firebase:firebase-messaging:11.0.1"
// SUB-PROJECT DEPENDENCIES END
}
Upvotes: 1
Views: 3607
Reputation: 337
Try add code from https://gist.github.com/caiovncius/8f639420823fd3e75a9ea6e039b11615 into your build.gradle
:
configurations {
all*.exclude group: 'com.android.support', module: 'support-v13'
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
Upvotes: 2
Reputation: 800
This issue related with incompatible new version of support library. Check your plugins folder, find lines with ~ com.android.support:support-v4:
and replace with com.android.support:support-v4:26+
Upvotes: 1