Android styles.xml 错误

Posted

技术标签:

【中文标题】Android styles.xml 错误【英文标题】:Android styles.xml errors 【发布时间】:2016-07-24 17:24:21 【问题描述】:

我正在查看一个使用带有 ADT 的 Eclipse 制作的 android 项目。

我已包含对 android-support-v7-appcompat.jar 的引用。

在 res/values/styles.xml 文件中出现此错误:

Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

在 res/values/themes.xml 我得到这些类型的错误:

Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.DarkActionBar'.

No resource found that matches the given name: attr 'actionBarStyle'.

Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light'.

etc...

似乎我只是缺少一小部分配置。有什么想法吗?

【问题讨论】:

【参考方案1】:

jars 不包括资源。您必须引用aar

【讨论】:

以上是关于Android styles.xml 错误的主要内容,如果未能解决你的问题,请参考以下文章