我知道有类似的问题,但没有一个答案解决了我的问题 . 这是升级到版本21时的error
在\ appcompat-v7 \ 21.0.0 \ res \ values-v11和values-v7 \ values.xml错误:找不到与给定名称匹配的资源:attr'android:actionModeShareDrawable' .
在\ appcompat-v7 \ 21.0.0 \ res \ values-v21 \ values.xml错误:找不到与给定名称匹配的资源:attr'android:overlapAnchor' .
有我的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'
}
还有我的sdk经理
有什么想法吗?谢谢
2 回答
重新安装android studio和sdk,问题解决了
在您的操作系统(x86 / 32bit或x64 / 64bit)上将SDK和SDK更新为SDK安装
Intel x86 Atom _64 System Image
或Intel x86 Atom System Image
中的最新版本 . 如果您使用的是Google API,请安装Google API Intel x86 Atom _64 System Image
或Intel x86 Atom System Image
希望它可能有所帮助 .