使用ionic cordova构建android应用:
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
相关依赖:
android-26
com.android.support:support-v4:26.+
com.android.support:appcompat-v7:26.+
com.android.support:support-v4:24.1.1+
com.android.support:support-v4:+
查了一下,可能是com.android.support:support-v4发布了新版com.android.support:support-v4:27.1.0。
解决方法:
把所有插件里依赖的com.android.support:support-v4:+替换为com.android.support:support-v4:27.1.0。
然后执行:
ionic cordova platform remove android
ionic cordova platform add android
最后运行成功!