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

Rya*_*yan 5 resources android gradle

我尝试同步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'.
Run Code Online (Sandbox Code Playgroud)

如果您希望项目看到给我一个消息.我真的很新的android工作室.我也重建了应用程序.

ABr*_*ros 5

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

  • 有没有一个很好的描述如何与所有支持的东西和Gradle和Studio有关.真是太乱了!看起来像Android是一个很大的黑客.我认为Studio应该自动更新,为什么开发人员需要手动更改它以适应? (2认同)