android - 找不到与给定名称 : attr 'android:actionModeShareDrawable' 匹配的资源

标签 android gradle resources

我尝试同步 Gradle 的所有内容都会出现此错误。我正在使用 SDK 21,并且安装了所有更新。我尝试删除 Value.xml、清理 Gradle、同步它并尝试更改 SDK 版本。它仍然出现。

这是哪里出了问题

C:\Users\User\AndroidStudioProjects\MyApplication\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
    Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'.

如果您希望看到该项目,请给我留言。 我真的是 android studio 的新手。我也重建了应用程序。

最佳答案

您需要确保将支持库作为依赖项的所有模块也将编译 SDK 设置为 21。因此,转到项目结构并检查左侧的所有模块。

关于android - 找不到与给定名称 : attr 'android:actionModeShareDrawable' 匹配的资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26794797/

相关文章:

android - 如何列出我的安卓设备的内容

android - 获取数据和传递给另一个 Activity 的最佳方式是什么?

android - 在 “rippleColor”字段上, Material 设计支持库和gms:wallet库之间是否存在此冲突的解决方案?

spring-boot - 如何使Spring/Gradle识别JdbcTemplate初始化

android - Xamarin Android 应用程序内存使用情况

ios - [椰子] :Resource Bundle not accessbile

java - bufferedReader.readline 返回 null

Android - 无法安装 *smartsocket* 监听器

performance - 将一个非常大的 Gradle 项目与许多子项目分开以使 Gradle Build Faster 和 IntelliJ Gradle Refresh 更快的指南

Android 布局错误 : "Resource id <res_id> is not of type STYLE (instead attr)"