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

时间:2014-11-07 05:38:34

标签: 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工作室。我也重建了应用程序。

2 个答案:

答案 0 :(得分:5)

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

答案 1 :(得分:0)

更新compileSdkVersion& buildToolsVersion到最新的可用的一个为我工作。 这些设置对我有用:

compileSdkVersion 26

buildToolsVersion' 26.0.1'