我试图同步Gradle的所有内容都会出现此错误。我正在使用SDK 21,并且我已经安装了所有更新。我尝试删除Value.xml,清理Gradle,同步它,并尝试更改SDK版本。但它还是出现了。
出了什么问题
C:UsersUserAndroidStudioProjectsMyApplicationappbuildintermediatesexploded-aarcom.android.supportappcompat-v721.0.0resvalues-v11values.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'.
如果你想看这个项目,给我留言。我真的是安卓工作室的新手。我也重建了应用程序。
您需要确保所有具有支持库作为依赖项的模块也将编译SDK设置为21。因此,转到项目结构并检查左侧的所有模块。
正在更新compileSdkVersion&buildToolsVersion到最新的可用版本对我有效。这些设置对我有效:
compileSdk版本26
buildToolsVersion‘26.0.1’