找不到与给定名称“@style/Theme.AppCompat.Light"匹配的资源 [英] No resource found that matches the given name '@style/Theme.AppCompat.Light'

查看:37
本文介绍了找不到与给定名称“@style/Theme.AppCompat.Light"匹配的资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经解决这个问题几个小时了.从 github 下载存储库后,任何 .xml 文件中唯一的错误是:

I have been on this problem for a couple hours. After downloading a repository from github, the only error in any .xml file is:

No resource found that matches the given name '@style/Theme.AppCompat.Light'

代码非常简单,但我没有找到一个简单的答案,关于如何减轻错误.

The code is very straightforward, but there is not one straightforward answer I have found, on how to alleviate the error.

这是代码(在文件 res/values/styles.xml 中):

here is the code (in file res/values/styles.xml):

<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
    <!-- API 14 theme customizations can go here. -->
</style>

项目位于:https://github.com/erikswed/InstaChatX我在 Windows 上,使用 Eclipse Kepler

The project is located at: https://github.com/erikswed/InstaChatX I am on Windows, using Eclipse Kepler

推荐答案

这样做的步骤是什么?AppCompat 位于何处?

在此处下载支持库:

http://developer.android.com/tools/support-library/setup.html

如果您使用的是 Eclipse:

If you are using Eclipse:

转到顶部的选项卡并选择(Windows -> Android SDK Manager).在附加"部分下,选中Android 支持库"并检查是否安装.

Go to the tabs at the top and select ( Windows -> Android SDK Manager ). Under the 'extras' section, check 'Android Support Library' and check it for installation.

之后,可以在以下位置找到 AppCompat 库:

After that, the AppCompat library can be found at:

android-sdk/extras/android/support/v7/appcompat

您需要在您的 Android 项目中引用此 AppCompat 库.

You need to reference this AppCompat library in your Android project.

将库导入 Eclipse.

Import the library into Eclipse.

  1. 右键点击您的 Android 项目.
  2. 选择属性.
  3. 点击底部的添加..."以添加库.
  4. 选择支持库
  5. 清理并重建您的项目.

这篇关于找不到与给定名称“@style/Theme.AppCompat.Light"匹配的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆