运行命令ionic cordova build android --stacktrace"时出现以下错误:
I get following error while running the command "ionic cordova build android --stacktrace" :
: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:Usersxyz>ionic -version
3.19.1
Npm as packagemanager
项目属性:
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
我不得不做上面两个答案的东西:
I had to do the stuff of both the answers above:
在 platforms/android/phonegap-plugin-barcodescanner:
搜索 compile 'com.android.support:support-v4:+
并替换为 compile 'com.android.support:support-v4:27+'
.
在平台/android:
搜索 cordova.system.library.2=com.android.support:support-v4:+
并替换为 cordova.system.library.2=com.android.support:support-v4:27.1.0
.
希望对你有帮助.
这篇关于构建错误-Ionic Cordova 对 android 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!