1
votes

I know there are similar questions, but none of the answers solved my problem. this is the error when upgrading to version 21

enter image description here

in \appcompat-v7\21.0.0\res\values-v11 and values-v7 \values.xml Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

in \appcompat-v7\21.0.0\res\values-v21\values.xml Error: No resource found that matches the given name: attr 'android:overlapAnchor'.

there is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.1'
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 21
        renderscriptTargetApi 21
        renderscriptSupportMode true
        ...
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('prog uard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

repositories {
    maven { url "http://dl.bintray.com/populov/maven" }
    mavenCentral()
    maven { url 'http://JRAF.org/static/maven/2' }
}



dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.0'
    compile 'com.android.support:support-v4:21. 0.0'
    compile 'com.android.support:recyclerview-v7:+'
    compile 'com.android.support:cardview-v7:21.0.0'
    compile 'com.google.android.gms:play-services:6.1.11'
    compile 'com.android.support:gridlayout-v7:21.0.0'

    compile 'com.github.chrisbanes.photoview:library:1.2.3'
    compile 'com.jakewharton:butterknife:5.1.0'
    compile 'com.github.johnkil.android-appmsg:appmsg:1.2.0'
    compile 'com.github.flavienlaurent.datetimepicker:library:0.0.2'

}

and there is my sdk manager enter image description here Any ideas? thanks

2
You have an extra space here compile 'com.android.support:support-v4:21. 0.0'. Dunno if it helps. - Eugen Pechanec
Thanks, but that's not it :( - user60108
Your Android L api is 21 now??? I have newest and for L is 20 only. Try Android 5.0 (API 21), should help. link - Dudeist

2 Answers

0
votes

reinstall android studio and sdk and the problem was solved

0
votes

Update your android & SDK to the latest, in SDK install Intel x86 Atom _64 System Image or Intel x86 Atom System Imagebase on your Operating system (x86/32bit or x64/64bit). And if you are using Google API then install Google API Intel x86 Atom _64 System Image or Intel x86 Atom System Image

hope it may help.