【发布时间】:2015-01-09 00:22:50
【问题描述】:
在更新 sdk 和支持库之前一切正常。更新后我刚刚添加了支持库(意味着导入了带有资源的支持库)。一旦我添加它,我会收到以下错误
错误:
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\styles_base.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\styles_base.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\styles_base.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v17\styles_rtl.xml:20: error: Error: No resource found that matches the given name: attr 'android:layout_marginStart'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v17\styles_rtl.xml:25: error: Error: No resource found that matches the given name: attr 'android:paddingEnd'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v17\styles_rtl.xml:24: error: Error: No resource found that matches the given name: attr 'android:paddingStart'.
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\themes_base.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\themes_base.xml:31: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\themes_base.xml:36: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Dialog'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v21\themes_base.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'.
[2014-11-12 13:28:16 - android-support-v7-appcompat]
[2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v11\themes_base.xml:338: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
将构建目标从 17 更改为 21 后,我收到这些错误
[2014-11-12 13:33:15 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-large-v14\themes_base.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.DialogWhenLarge.Base'.
[2014-11-12 13:33:15 - android-support-v7-appcompat]
[2014-11-12 13:33:15 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-large-v14\themes_base.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.Light.DialogWhenLarge.Base'.
[2014-11-12 13:33:15 - android-support-v7-appcompat]
我尝试了很多方法,例如再次导入项目更改 project.properties 文件等,我无法解决问题
请帮助我提前谢谢。
【问题讨论】:
-
一旦重启你的 Eclipse !!!
-
从 values-v14 文件夹中删除这个主题或包含材料设计库
-
您从哪里获得 v21.0.1?我在野外看到的最后一个版本是 21.0.0
-
@Duggu 也试过了..
-
@SuhailMehta 材料设计库意味着..?
标签: android android-support-library android-appcompat