Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius')

Can anybody help why I am getting an error in the following?

Error:(7, 41) No resource found that matches the given name (at 'dialogCornerRadius' with value '?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'
like image 570
Pavan Pyati Avatar asked Mar 08 '18 10:03

Pavan Pyati


4 Answers

I fixed this issue by selecting

API 27+: Android API 27, P preview (Preview)

in the project structure settings. Following image shows my setting. The 13 errors that were coming while building the app, have disappeared.

My Gradle settings

like image 97
Jon Avatar answered Nov 11 '22 22:11

Jon


set your compileSdkVersion 28 let android studio download platform files

like image 16
SHINERAJ ARATHIL Avatar answered Nov 11 '22 22:11

SHINERAJ ARATHIL


if in your app level gradle if you have used compileSdkVersion = 27 then it will not work. You have to use version 28.

compileSdkVersion 28 buildToolsVersion '28.0.3'

like image 5
Anant Shah Avatar answered Nov 12 '22 00:11

Anant Shah


Change the line compile 'com.android.support:design:+' to compile 'com.android.support:design:26.+'

The gradle dependencies when the project is built is pulling down the latest versions since the + was telling it "get the latest version." the 26.+ will tell the build process to only update the latest version of v26.

Or to be even more specific and safe, change the line to a specific version, avoiding the + altogether. i.e. compile 'com.android.support:design:27.1.0'

like image 3
Mike Ohlsen Avatar answered Nov 12 '22 00:11

Mike Ohlsen