简体   繁体   English

Android:找不到与给定名称匹配的资源:Theme.AppCompat.Light

[英]Android: No resource found that matches the given name :Theme.AppCompat.Light

Good day ! 美好的一天 ! I get this error and do not know how to fix it! 我收到此错误,不知道如何解决! I try to use this and this links, but it not works to me. 我尝试使用链接和链接,但对我不起作用。

I get this error here: 我在这里收到此错误:

 <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>

But,also, i get many other errors at my source code: 但是,我在源代码中也遇到了许多其他错误:

    setContentView(R.layout.main);  - main checks as error.

So, i import appcompat library into workspace , make ReferenceLibraries from libs at this library (android-support-v4 ,android-support-v7-appcompat ) 所以,我将appcompat库导入到工作区中,从该库的libs中创建ReferenceLibraries(android-support-v4,android-support-v7-appcompat)

But it not works on me. 但这对我不起作用。

在此处输入图片说明

Wneh i try to add appcompat to my project-each time i get this error.- i re-add appcompat into my project,click OK. 为什么我尝试将appcompat添加到我的项目中-每次出现此错误。-我将appcompat重新添加到我的项目中,单击“确定”。 But if i open Android menu again- i see the same picture. 但是,如果我再次打开Android菜单-我会看到同一张图片。

Please, help me to fix this problem! 请帮我解决这个问题! I try to solve it many times! 我尝试解决很多次!

Thank you! 谢谢!

PS here my screen that can help. PS在这里我的屏幕可以帮助。

在此处输入图片说明在此处输入图片说明在此处输入图片说明

在此处输入图片说明

I can't see AppCompat in your reference project, add the AppCompat to it and then this will get resolve - 我在您的参考项目中看不到AppCompat,将AppCompat添加到其中,然后可以解决-

  1. File->Import (android-sdk\\extras\\android\\support\\v7). 文件->导入(android-sdk \\ extras \\ android \\ support \\ v7)。 Choose "appcompat" 选择“ appcompat”
  2. Project-> properties->Android. 项目->属性-> Android。 In the section library "Add" and choose "appCompat" That is all! 在节库“添加”中,选择“ appCompat”,仅此而已!

Please refer to this as well. 请也参考

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到与给定名称“ Theme.AppCompat.Light”匹配的资源 - No resource found that matches the given name 'Theme.AppCompat.Light' 找不到与给定名称“ @ style / Theme.AppCompat.Light”匹配的资源 - No resource found that matches the given name '@style/Theme.AppCompat.Light' 找不到与给定名称“ Theme.AppCompat.Light”匹配的资源。 Android Studio - No resource found that matches the given name 'Theme.AppCompat.Light'. Android Studio 键入错误:检索项目的父项时出错:未找到与给定名称&#39;Theme.AppCompat.Light&#39;匹配的资源。 styles.xml Android AAPT - Type error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. styles.xml Android AAPT 如何修复Mac版的android eclips“错误检索父项:找不到与给定名称&#39;Theme.AppCompat.Light&#39;相匹配的资源? - How to fix mac version of android eclips 'Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'? 找不到与给定名称&#39;@ style / Theme.AppCompat.Light&#39;相匹配的资源 - No resource found that matche the given name '@style/Theme.AppCompat.Light' 找不到与给定名称匹配的资源:attr&#39;colorPrimary&#39;Theme.AppCompat.Light - No resource found that matches the given name: attr 'colorPrimary' Theme.AppCompat.Light 从Eclipse中的源代码创建Android项目:检索项目的父项时出错:未找到与给定名称&#39;Theme.AppCompat.Light&#39;匹配的资源 - Create Android project from source in Eclipse: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light' 寻求帮助:“错误:检索项目父项时出错:找不到与给定名称&#39;Theme.AppCompat.Light&#39;相匹配的资源” - Asking for help: “error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light' ” 检索项目的父项时出错:找不到与给定名称“Theme.AppCompat.Light”匹配的资源。 我的R.java失踪了 - Error retrieving parent for item:No resource found that matches the given name 'Theme.AppCompat.Light'. MY R.java is missing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM