【问题标题】:Asking for help: "error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light' "寻求帮助:“错误:检索项目的父项时出错:找不到与给定名称'Theme.AppCompat.Light'匹配的资源”
【发布时间】:2017-05-20 07:46:54
【问题描述】:

我是 Android 的大一新生。当我在Eclipse中创建一个Android应用项目时,出现了三个错误。如下: Details of three errors

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

为了解决这个问题,我在网上搜索了很多次。我确实在互联网上找到了一些解决方案,但没有奏效。 如果有人能帮助我,我将不胜感激~

【问题讨论】:

标签: android


【解决方案1】:

在 values-->style 文件夹中检查您的应用主题,也在 values-v11,values-v14 中。

检查您的活动扩展了“AppcompactActivity”或“活动”。 如果您必须使用“Activity”来扩展您的 Activity,请转到 style.xml 并更改父“主题”,如“android:Theme.Light”。

【讨论】:

  • 谢谢。出现新错误:\res\menu\main.xml:6: error: No resource identifier found for attribute 'showAsAction' in package 'com.example.test26' 我该怎么办...
  • eclipse 已经过时 android 开发尝试使用android studio
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-10-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-10-27
相关资源
最近更新 更多