ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android: font *
See original GitHub issueHi , Please help me to solve this problem. since i have no idea to solve this.
Description:
I’m getting this error when deploying to build android , Failed to load resource: net::ERR_FILE_NOT_FOUND roboto-regular.woff2, took a look at assets/fonts folder and there is only 2 files: ionicons.woff and ionicons.woff2, all the other fonts are gone.
defaults Roboto fonts are not showing in www/assets/fonts folder.
Steps:
Example repo:
1.ionic cordova platform remove android
2.ionic cordova platform add android
3.ionic cordova build android
Output: :processDebugResources ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex
FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ‘:processDebugResources’.
com.android.ide.common.process.ProcessException: Failed to execute aapt
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 52.543 secs Error: /Users/arun-1702/FireSafety/fireSafety/platforms/android/gradlew: Command failed with exit code 1 Error output: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ‘:processDebugResources’.
com.android.ide.common.process.ProcessException: Failed to execute aapt
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
My ionic info
:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.15.0
ionic (Ionic CLI) : 3.15.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.1
ios-sim : 5.0.13
Node : v8.4.0
npm : 5.4.2
OS : OS X El Capitan
Xcode : Xcode 8.2.1 Build version 8C1002
Environment Variables:
ANDROID_HOME : /Users/home/Library/Android/sdk
Misc:
backend : pro
Other Information:
1 ) cordova requirements android
Requirements check results for android: Java JDK: installed 1.8.0 Android SDK: installed true Android target: installed android-26,android-25,android-24,android-23,android-22,android-21,android-20,android-19,android-18,android-17,android-16,android-15,android-14,android-13,android-12 Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-3.2/bin/gradle
- cordova plugin list
cordova-plugin-badge 0.8.7 “Badge” cordova-plugin-compat 1.2.0 “Compat” cordova-plugin-device 2.0.1 “Device” cordova-plugin-local-notification 0.9.0-beta.2 “LocalNotification” cordova-plugin-network-information 2.0.1 “Network Information” cordova-plugin-splashscreen 4.1.0 “Splashscreen” cordova-plugin-statusbar 2.4.0 “StatusBar” cordova-plugin-whitelist 1.3.3 “Whitelist” cordova-sqlite-storage 2.2.0 “Cordova sqlite storage plugin” ionic-plugin-keyboard 2.2.1 “Keyboard” phonegap-plugin-barcodescanner 6.0.8 “BarcodeScanner” phonegap-plugin-push 2.1.2 “PushPlugin”
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top GitHub Comments
Install this plugin to fix this issue.
ionic cordova plugin add cordova-android-support-gradle-release --save
https://github.com/dpa99c/cordova-android-support-gradle-releaseremove local notifications plugin update npm latest version remove platforms , plugins, node_modules , package-lock.josn npm install —save then add platform android and build it finally run android. it’s working successfully.