日志
error: resource android:attr/fontVariationSettings not found.
error: resource android:attr/ttcIndex not found.
分析
fontVariationSettings added in api level 28.
解决
gradle(module)之allprojects节点添
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.android.support') {
details.useVersion "24.0.0"
}
}
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.android.support') {
details.useVersion "24.0.0"
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
有其它support 包不想改该版本号可通
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
仍错建用v4:24.0.0