找不到与给定名称匹配的资源:attr’android:actionModeShareDrawable’appcompat -v7:21.0.0 with compileSdkVersion 21

我正在尝试在我的一个项目中使用Material Design.但我对appcompat-v7:21.0.0库的使用体验非常糟糕.一旦我在 Android Studio中添加依赖项并开始同步,我就会收到以下错误.
Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

No resource found that matches the given name: attr 'android:overlapAnchor'.

但我确信我正在使用最新的构建工具编译最新的SDK 21.这是我的构建配置.

android {
compileSdkVersion 21
buildToolsVersion '21.0.1'

defaultConfig {
    minSdkVersion 15
    targetSdkVersion 21
    versionCode 3
    versionName "0.0.003"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
    }
}
}

我在这里做的错误是什么?它适用于其他所有人吗?
这是我的其他依赖项FYI.经过这一步的人,请指导我.

dependencies {
compile fileTree(dir: 'libs',include: ['*.jar'])
compile files('libs/smartconfiglib.jar')
compile 'com.android.support:support-v4:21.0.0'
compile 'com.crashlytics.android:crashlytics:1.1.13'
compile 'com.google.android.gms:play-services:6.1.11'
compile 'com.jakewharton.hugo:hugo-runtime:1.1.0'
compile 'com.squareup.retrofit:retrofit:1.7.1'
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:cardview-v7:21.0.0'
compile 'com.jakewharton:butterknife:5.1.2'
compile 'de.greenrobot:eventbus:2.2.1'
compile 'fr.avianey:facebook-android-api:+@aar'
compile('de.keyboardsurfer.android.widget:crouton:1.8.4@aar') {
    exclude group: 'com.google.android',module: 'support-v4'
}
apt 'com.turbomanage.storm:storm-impl:0.99'
compile 'com.turbomanage.storm:storm-api:0.99'
compile 'com.squareup.picasso:picasso:2.3.4'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.apptentive:apptentive-android:1.6.+@aar'
compile 'com.github.flavienlaurent.datetimepicker:library:0.0.2'

}

解决方法

进入Android SDK Manager并删除以下两个SDK平台:

> L预览SDK平台
> API 21 SDK平台

然后继续并重新安装API 21 SDK Platform.

那为我修好了!请参阅details.

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...