您的位置:首页 > 其它

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文件,并自动重新生成。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐