Error:(9, 5) error: resource android:attr/dialogCornerRadius not found

后端 未结 16 1981
攒了一身酷
攒了一身酷 2020-12-02 12:28

So I installed android studio 3.0.1 and as soon as it opened the gradle built and showed the following errors. I tried adding dependencies such as design and support but in

16条回答
  •  無奈伤痛
    2020-12-02 13:07

    Maybe it's too late but i found a solution:

    You have to edit in the build.gradle either the compileSdkVersion --> to lastest (now it is 28). Like that:

    android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "NAME_OF_YOUR_PROJECT_DIRECTORY"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    

    or you can change the version of implementation:

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        api 'com.android.support:design:27.+'
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support.constraint:constraint-layout:1.1.2'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    }
    

提交回复
热议问题