【发布时间】:2015-01-07 10:01:17
【问题描述】:
我知道有类似的问题,但没有一个答案能解决我的问题。 这是升级到版本 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 经理 有任何想法吗?谢谢
【问题讨论】:
-
你在
compile 'com.android.support:support-v4:21. 0.0'有一个额外的空间。不知道是否有帮助。 -
谢谢,但不是这样 :(
-
你的Android L api现在是21???我有最新的,L 只有 20。试试 Android 5.0 (API 21),应该会有所帮助。 link
标签: android updates android-appcompat