No resource found that matches the given name
2014-03-24 21:44
387 查看
错误信息:
Description Resource Path Location Type error:
Error retrieving parent for item: No resource found that matches the given name‘android:Theme.Holo.Light.DarkActionBar’. styles.xml
Description Resource Path Location Type error:
Error retrieving parent for item: No resource found that matches the given name‘android:Theme.Holo.Light’. styles.xml
分析:
我们原有的Build SDK为API 18,Minimum Required SDK 为API 8,没有更改资源状况,如果从API 8环境进入工程时便会发生该错误,在Problems窗口中也不会显示该错误信息。
这是因为,我们在建立API 18 时,系统会自动生成 values-v11 和 values-v14,分别是API 11 和API 14的资源目录,所以在API 8下,系统是不能识别 values-v11 和 values-v14的。
解决办法(两种):
1.删除这两个用不到的资源目录。
2.(1)右键工程,选择properties—>Android,勾选Android 4,3,点击ok。
(2)确认工具栏project—>Build Automatically已经勾选,系统将在清除R文件后自动再生成,否则不会生成R文件。
(3)选择工具栏project—>Clean,选择该工程,点击ok。系统将清除该工程的R文件,并自动重新生成。
Description Resource Path Location Type error:
Error retrieving parent for item: No resource found that matches the given name‘android:Theme.Holo.Light.DarkActionBar’. styles.xml
Description Resource Path Location Type error:
Error retrieving parent for item: No resource found that matches the given name‘android:Theme.Holo.Light’. styles.xml
分析:
我们原有的Build SDK为API 18,Minimum Required SDK 为API 8,没有更改资源状况,如果从API 8环境进入工程时便会发生该错误,在Problems窗口中也不会显示该错误信息。
这是因为,我们在建立API 18 时,系统会自动生成 values-v11 和 values-v14,分别是API 11 和API 14的资源目录,所以在API 8下,系统是不能识别 values-v11 和 values-v14的。
解决办法(两种):
1.删除这两个用不到的资源目录。
2.(1)右键工程,选择properties—>Android,勾选Android 4,3,点击ok。
(2)确认工具栏project—>Build Automatically已经勾选,系统将在清除R文件后自动再生成,否则不会生成R文件。
(3)选择工具栏project—>Clean,选择该工程,点击ok。系统将清除该工程的R文件,并自动重新生成。
相关文章推荐
- Android问题集锦之二十一:No resource found that matches the given name
- Error retrieving parent for item: No resource found that matches the given name.....
- error: Error retrieving parent for item: No resource found that matches the given name 解决办法
- 报错“No resource found that matches the given name 'Theme.AppCompat.Light”-完美解决方案
- Error:(26, 34) No resource found that matches the given name (at 'layout_toLeftOf' with value '@id/b
- Android No resource found that matches the given name 'Theme.App
- No resource found that matches the given name 'android:Widget.Material.ActionButton'的原因及解决方法
- No resource found that matches the given name
- No resource found that matches the given name
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name ‘android.TextAppearance.Materia...
- No resource found that matches the given name 9png
- 【转】eclipse新建项目,报错“Error: workspace\appcompat_v7\res\values-v21\styles_base.xml No resource found that matches the given name”
- Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:T
- Error: No resource found that matches the given name (at 'layout_toLeftOf' with value '@id/p
- Android Error retrieving parent for item: No resource found that matches the given name '...'
- Error No resource found that matches the given name 'Theme.AppCompat.Light
- No resource found that matches the given name (at 'layout_above' with value '@id/butt
- No resource found that matches the given name (at 'layout_toLeftOf' with value '@id/ history_child_
- Error retrieving parent for item: No resource found that matches the given name