简体   繁体   English

寻求帮助:“错误:检索项目父项时出错:找不到与给定名称'Theme.AppCompat.Light'相匹配的资源”

[英]Asking for help: “error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light' ”

I'm a freshman in Android. 我是Android的新生。 When I create an Android application project in Eclipse, three errors occurred.As follow: Details of three errors 当我在Eclipse中创建一个Android应用程序项目时,发生了三个错误。如下所示: 三个错误的详细信息

This is the code in styles.xml: 这是styles.xml中的代码:

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

To solve this, I have searched a lot of times on the Internet. 为了解决这个问题,我在互联网上搜索了很多次。 I did find some solutions on the Internet, but that didn't work. 我确实在Internet上找到了一些解决方案,但这没有用。 I would be really grateful if anybody could help me out~ 如果有人能帮助我,我将非常感谢〜

check your app theme in values-->style folder also in values-v11,values-v14. 在values-v11,values-v14中的values-> style文件夹中检查您的应用主题。

check what your activity extend "AppcompactActivity" or "Activity". 检查您的活动扩展了“ AppcompactActivity”或“ Activity”。 if you have to use "Activity" for extend of your activity, then go to style.xml and change parent "theme" like "android:Theme.Light". 如果您必须使用“活动”来扩展活动,请转到style.xml并更改父级“主题”,例如“ android:Theme.Light”。

暂无
暂无

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

相关问题 键入错误:检索项目的父项时出错:未找到与给定名称&#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 检索项目的父项时出错:找不到与给定名称“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 如何修复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'? 从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' 错误:检索项目的父项时出错:找不到与给定名称“ Theme.AppCompat.Light.NoActionBar”匹配的资源 - error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar' Xamarin-检索项目的父项时出错:找不到与给定名称&#39;Theme.AppCompat.Light.DarkActionBar&#39;匹配的资源 - Xamarin - Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar' 检索项目的父项时出错:找不到与给定名称匹配的资源&#39;@android:style / Theme.AppCompat.Light.DarkActionBar&#39; - Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.AppCompat.Light.DarkActionBar' 检索项目的父项时遇到错误:找不到与给定名称“ Theme.AppCompat.Light.DarkActionBar”匹配的资源 - Faced with Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar' Android studio错误检索项目的父项:找不到与给定名称“Theme.AppCompat.Light.DarkActionBar”匹配的资源 - Android studio Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar' Eclipse错误创建android应用程序:检索项的父项时出错:找不到与给定名称&#39;Theme.AppCompat.Light.DarkActionBar&#39;匹配的资源 - Eclipse error create android app:Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM