Eclipse 上的 Appcompat res values-v21 themes_base 错误不会消失

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27059798/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 22:14:18  来源:igfitidea点击:

Appcompat res values-v21 themes_base errors on eclipse are not going away

javaandroidxmleclipseandroid-appcompat

提问by Sourabh S Nath

I had checked for the questions and have not found a suitable answer for my problem

我已经检查了问题,但没有找到适合我的问题的答案

+ [2014-11-21 16:12:02 - android-support-v7-appcompat] 
[2014-11-21 16:12:02 - android-support-v7-appcompat] E:\MISC\canvas\eclipse workspace\android-support-v7-appcompat\res\values-v21\themes_base.xml:220: error: Error: No resource found that matches the given name: attr 'colorControlNormal'.
[2014-11-21 16:12:02 - android-support-v7-appcompat] 
[2014-11-21 16:12:02 - android-support-v7-appcompat] E:\MISC\canvas\eclipse workspace\android-support-v7-appcompat\res\values-v21\themes_base.xml:225: error: Error: No resource found that matches the given name: attr 'colorControlHighlight'.
[2014-11-21 16:12:02 - android-support-v7-appcompat] 
[2014-11-21 16:12:02 - android-support-v7-appcompat] E:\MISC\canvas\eclipse workspace\android-support-v7-appcompat\res\values-v21\themes_base.xml:224: error: Error: No resource found that matches the given name: attr 'colorControlNormal'.
[2014-11-21 16:12:02 - android-support-v7-appcompat] 
[2014-11-21 16:14:50 - android-support-v7-appcompat] E:\MISC\canvas\eclipse workspace\android-support-v7-appcompat\res\values-v21\themes_base.xml:50: error: Error retrieving parent for item: No resource found that matches the given name 'Base.V7.Theme.AppCompat'.
[2014-11-21 16:14:50 - android-support-v7-appcompat] 
[2014-11-21 16:14:50 - android-support-v7-appcompat] E:\MISC\canvas\eclipse workspace\android-support-v7-appcompat\res\values-v21\themes_base.xml:74: error: Error: No resource found that matches the given name: attr 'editTextBackground'.
..................................
........................................
[2014-11-21 16:15:48 - android-support-v7-appcompat] 
[2014-11-21 16:15:48 - android-support-v7-appcompat] E:\MISC\canvas\eclipse workspace\android-support-v7-appcompat\res\values-v21\themes_base.xml:225: error: Error: No resource found that matches the given name: attr 'colorControlHighlight'.
[2014-11-21 16:15:48 - android-support-v7-appcompat] 
[2014-11-21 16:15:48 - android-support-v7-appcompat] E:\MISC\canvas\eclipse workspace\android-support-v7-appcompat\res\values-v21\themes_base.xml:224: error: Error: No resource found that matches the given name: attr 'colorControlNormal'.

Project properties are the same for my app and the appcompat v7 too. The target is set to 21 for both appcompat and my app. The error was at styles_base and later after followingsome answers it jumped to themes base. I had even reinstalled java and eclipse.

我的应用程序和 appcompat v7 的项目属性也相同。appcompat 和 my app 的目标都设置为 21。错误是在styles_base,后来在遵循一些答案之后它跳到了主题库。我什至重新安装了java和eclipse。

Please what should I do?

请问我该怎么办?

采纳答案by cmcromance

Build your project with the API 21 SDK to Let your project know about resource for API 21. Don't forget to clean and re-build.

使用 API 21 SDK 构建您的项目,让您的项目了解 API 21 的资源。不要忘记清理和重新构建。

回答by Machado

First check if Eclipse includes appcompat_v21 on your Library path.

首先检查 Eclipse 是否在您的库路径中包含 appcompat_v21。

Right click on your project -> Properties -> Android

右键单击您的项目 -> 属性 -> Android

enter image description here

在此处输入图片说明

Check if the project appcompat_v21 is checked.

检查项目 appcompat_v21 是否被选中。

If it doesn't solve your problem. Carefully check the your

如果它不能解决您的问题。仔细检查您的

AndroidManifest.xml

And change android:theme into:

并将 android:theme 更改为:

android:theme="@style/AppTheme"

android:theme="@style/AppTheme"

Then, clean your project and it should be fine.

然后,清理您的项目,它应该没问题。

回答by Sumit

i had the same problem in appcompat_v7 support lib in values-21\themes_base.xml that

我在 values-21\themes_base.xml 中的 appcompat_v7 支持库中遇到了同样的问题

error retrieving parrent Base.V7.Theme.AppCompat

检索父级 Base.V7.Theme.AppCompat 时出错

than i completely delete project from workspase and update Android Support Library to 21.0.2 and re-import library from extras\android.....appcompat

比我从工作区完全删除项目并将 Android 支持库更新到 21.0.2 并从 extras\android.....appcompat 重新导入库

problem solved i hope this helps you

问题解决了希望对你有帮助