Build Error -Ionic Cordova fails for android [dupl

2019-04-26 20:41发布

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:\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

8条回答
Fickle 薄情
2楼-- · 2019-04-26 21:22

In my case, problem was in barcode scanner plug in. Removing and adding this plug in did not work, after all get it worked by changing 'com.android.support:support-v4:+' to 'com.android.support:support-v4:27+' in file 'platform/android/phonegap-plugin-barcodescanner/{projectName}-barcodescanner'. What I did not understand is project was working yesterday perfectly, what happened in 24 hours and this problem occured...

查看更多
淡お忘
3楼-- · 2019-04-26 21:25

I did not find "com.android.support:support-v4:+" in the indicated paths of the topics I searched for, as I tried lastly in all folders and found in

platforms/android/phonegap-plugin-barcodescanner.gradle

in my case the plugin was the barcodescanner, in yours may be another. then I followed the information and replaced with "'com.android.support:support-v4:27+" and it worked.

I was wondering if it was working perfectly yesterday, today I changed only one text and gave this error ... during the build I realized that some downloads occurred I believe that an update happened that caused this.

查看更多
登录 后发表回答