android中的xml文件样式

android中的xml文件样式,android,xml,Android,Xml,我最近开始在安卓系统上工作,我一直在查看我同事的应用程序代码,以了解更多信息 我遇到了这个文件,它也有一个错误 你能告诉我它是什么和它的作用吗 <resources> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. -->

我最近开始在安卓系统上工作,我一直在查看我同事的应用程序代码,以了解更多信息

我遇到了这个文件,它也有一个错误

你能告诉我它是什么和它的作用吗

<resources>

<!--
    Base application theme, dependent on API level. This theme is replaced
    by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
    <!--
        Theme customizations available in newer API levels can go in
        res/values-vXX/styles.xml, while customizations related to
        backward-compatibility can go here.
    -->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <!-- All customizations that are NOT specific to a particular API-level can go     here. -->
</style>

</resources>

错误在第7行 检索项的父项时出错,
未找到与给定名称“Theme.AppCompat.Light”匹配的资源。请检查您是否下载并安装了支持库。这里是链接。希望这可能是你面临的问题


这是您正在使用的主题文件。
问题是库可能无法导入到您的项目中,因此,
是否执行以下步骤转到

1.文件->导入(android sdk\extras\android\support\v7)。选择“appcompat”
2.项目->属性->Android。在库的“添加”部分中,选择“appCompat”
或者,如果问题尚未解决,您可以参考此帖子

您的样式文件中有这一行吗<代码>如果没有,请将其添加到示例中的android-support-v7-appcompat项目到您的工作区中。然后在项目中添加对它的引用。您还必须将support-v4库添加到libs文件夹中,并将其添加到构建路径中。