2

when i build my android project,I've the following error

Error:In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings

Before I could build the project very well, and I have not modified any configuration, the following is my related configuration

project build.gradle

buildscript {
    repositories {
        mavenCentral()
        jcenter{
            url 'http://jcenter.bintray.com/'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.1'
        classpath 'me.tatarka:gradle-retrolambda:3.2.4'
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven{ url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' }
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

app build.gradle

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.2"
    defaultConfig {
        applicationId "com.bsyx.callsystem"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:support-v4:27.1.0'

    compile 'com.android.support:appcompat-v7:27.1.0'
    compile 'com.android.support:design:27.1.0'
    compile 'com.android.support:recyclerview-v7:27.1.0'
    compile 'com.android.support:cardview-v7:27.1.0'
}

the following is the error details

enter image description here

gotwo
  • 663
  • 8
  • 16
Y.Chen
  • 21
  • 1
  • 2

1 Answers1

1

Change "com.android.support:support-v4:27.1.0 " to below

configurations.all {
resolutionStrategy {
    force 'com.android.support:support-v4:27.1.0'
}}
Devesh Kumawat
  • 173
  • 1
  • 6
  • 4
    What exactly was the problem? How does this solve it? What should one do if the mentioned version is outdated? Can you please explain a little more about the background? – Larce Mar 09 '18 at 07:43