在<declare-styleable> FontFamilyFont中,无法找到属性android:ttcIndex - Cordova构建编译错误

时间:2018-04-02 07:50:24

标签: android cordova

我正在尝试在cordova中构建一个应用程序。一切都很好,直到最后几天。但现在构建不断失败。

错误是

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

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

我尝试了stackoverflow中提到的所有可能的方法。 我交叉检查了所有plugin.xml文件,并对app compat版本进行了更改,不使用28.删除并添加了几次平台。清洁了cordova项目。手动编辑的project.properties。但到目前为止还没有运气。

这是我的project.properties文件。

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

我的插件列表

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"

请帮帮我。我坚持使用构建。

更新1

build.gradle文件依赖项

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
}

1 个答案:

答案 0 :(得分:1)

此问题与不兼容的新版支持库有关。检查您的插件文件夹,找到〜com.android.support:support-v4:的行并替换为com.android.support:support-v4:26+