找不到与给定名称匹配的资源('dialogCornerRadius'与值'?android:attr/dialogCornerRadius')

Pav*_*ati 25 dependencies android build-error gradle

任何人都可以帮助为什么会出错?

一切都很好,突然间出现了这个错误.

我用Google搜索但无法得到任何东西!请帮忙

错误:(7,41)找不到与给定名称匹配的资源(在'dialogCornerRadius'中,值为'?android:attr/dialogCornerRadius').

apply plugin: 'com.android.application'

//Add these lines
def Base_URL = '"' + WEBServiceBaseURL + '"' ?: '"Define BASE URL"';
def SMS_Base_URL = '"' + WEBServiceBaseSMSURL + '"' ?: '"Define SMS BASE URL"';

android.buildTypes.each { type ->
    type.buildConfigField 'String', 'Base_URL', WEBServiceBaseURL
    type.buildConfigField 'String', 'SMS_Base_URL', WEBServiceBaseSMSURL
}

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.bla.bla"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled  true
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:design:+'
    compile files('libs/jxl-2.6.jar')
    compile 'com.google.gms:google-services:+'

    compile 'com.google.firebase:firebase-core:11.8.0'
    compile 'com.google.firebase:firebase-messaging:11.8.0'
}

apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)

Jon*_*Jon 51

我选择修复了这个问题

API 27+:Android API 27,P预览(预览)

在项目结构设置中.下图显示了我的设置.构建应用程序时出现的13个错误已经消失.

我的Gradle设置


SHI*_*HIL 15

设置你的compileSdkVersion 28 让android studio下载平台文件


Ana*_*hah 5

如果在您的应用程序级别 gradle 中使用了compileSdkVersion = 27,那么它将无法工作。你必须使用28版本。

compileSdkVersion 28 buildToolsVersion '28.0.3'