AAPT: error: resource android:attr/fontVariationSettings not found.
See original GitHub issue_~.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\b455673db66bf379c6b553212db86e77\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
~.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\b455673db66bf379c6b553212db86e77\res\values\values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found._
I am facing this issue.
app/build.gradle
android {
compileSdkVersion 28
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.Marian"
minSdkVersion 16
targetSdkVersion 27
versionCode 0016
versionName "marianv0016"
multiDexEnabled true
lintOptions {
abortOnError false
}
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
dependencies {
implementation project(':react-native-gesture-handler')
implementation project(':react-native-push-notification')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:27.1.1"
implementation "com.android.support:support-core-utils:27.1.1"
implementation project(':react-native-fcm')
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation ("com.facebook.react:react-native:+") { force = true } // From node_modules
implementation project(':realm')
implementation project(':react-native-fs')
implementation project(':react-native-vector-icons')
implementation project(':react-native-image-picker')
implementation project(':rn-fetch-blob')
implementation project(':react-native-image-crop-picker')
implementation project(':react-native-exit-app')
implementation project(':react-native-onesignal')
implementation project(':react-native-sensor-manager')
implementation project(':react-native-smart-barcode')
implementation project(':react-native-push-notification')
implementation project(':react-native-linear-gradient')
implementation project(':react-native-file-picker')
implementation project(':react-native-doc-viewer')
implementation project(':react-native-svg')
implementation project(":react-native-google-signin")
implementation project(':react-native-spinkit')
implementation project(':react-native-pdf')
}
// apply plugin: 'com.google.gms.google-services'
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
}
}
apply plugin: 'com.google.gms.google-services'
build.gradle
buildscript {
ext {
googlePlayServicesAuthVersion = "12.0.1" // <--- use this version or newer
// firebaseVersion ="17.3.4"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:3.2.1'
classpath 'com.android.tools.build:gradle:3.1.0'
}
}
allprojects {
repositories {
google()
mavenLocal()
mavenLocal()
// for modules depending on jitpack.io
maven { url "https://jitpack.io" }
// add this one
maven {
url "https://maven.google.com"
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
// url 'https://maven.google.com'
}
jcenter()
}
}
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
defaultConfig {
targetSdkVersion 27
}
}
}
}
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.1.1"
}
}
}
}
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
Why does it happens. Any idea hot to solve this ?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:18
Top Results From Across the Web
error: resource android:attr/fontVariationSettings not found
try to change the compileSdkVersion to: compileSdkVersion 28. fontVariationSettings added in api level 28. Api doc here.
Read more >error: resource android:attr/fontVariationSettings not found
Hey, just tried to run a build today and ran into this issue. I initially didn't do any updates or anything, just tried...
Read more >resource android:attr/fontVariationSettings not found
Hello,. So this appears to be a rather persistent problem while building with phonegap. I'm using the latest config.xml in this moodle ...
Read more >error: resource android:attr/fontvariationsettings not found. flutter
error : resource android:attr/fontvariationsettings not found. flutter. For those that must keep compileSdkVersion 27 and are unable to upgrade to androidx ...
Read more >Solved : AAPT: error: resource android:attr/lStar not found
AAPT : error : resource android : attr /lStar not foundAAPT: error : resource android : attr /lStar not found #انتسب_للقناة_من_هنا ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Until a fix for this comes, use the below procedure to fix the issue.
This happened because Google upgraded libraries for androidX and few react native projects also started supporting it. React Native version 0.60.0 will get support for these libraries, maybe not below that. So you have to use the lower versions for those android libraries. To solve, follow the procedure below.
Search for androidX in the output. Get all the libraries having androidx. 2. Make a change in build.gradle inside android/app
These were the libraries that caused problem in my react native project. Google maintains all the releases here https://developers.google.com/android/guides/releases#may_07_2019 . You can choose any other version also. This solution solved issue in my case. Let me know if this helps.
IF your project is on SDK version 27 simply add
googlePlayServicesVersion=12.0.1
on top of the android/gradle.properties file.