简体   繁体   English

错误:检索项目的父项时出错:找不到与给定名称“android:Theme.Holo”匹配的资源

[英]error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'

Error: No resource found that matches the given name: attr 'listViewStyle' 错误:找不到与给定名称匹配的资源:attr'listViewStyle'

I have tried everything from here. 我从这里尝试了一切。 Nothing is working. 什么都行不通。

I have imported API demos to the eclipse of API version 15 and also giving error in src files like "The import com.example.android.apis.R cannot be resolved" 我已经在API版本15的eclipse中导入了API演示,并且在src文件中也出现了错误,例如“导入com.example.android.apis.R无法解析”

Help me out please. 请帮帮我。

I have error wit this in values-v11/styles.xml file 我在values-v11/styles.xml文件中有错误

<style name="ThemeHolo" parent="android:Theme.Holo">
</style>

<!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
<style name="ThemeHoloDialog" parent="android:Theme.Holo.Dialog">
</style>

<!-- For API level 11 or later, we can use the magical DialogWhenLarge theme. -->
<style name="ThemeDialogWhenLarge" parent="android:style/Theme.Holo.DialogWhenLarge">
</style>

and also I have an error in values/styles.xml "error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.NoActionBar'." 并且我在values / styles.xml中有一个错误“错误:检索项目的父项时出错:找不到与给定名称匹配的资源'@android:style / Theme.Holo.Light.NoActionBar'。” in following lines 在以下几行中

<style name="BadTheme" parent="@android:style/Theme.Holo.Light.NoActionBar">
</style>

您可以将Holo主题称为parent="@android:style/Theme.Holo" ,但要使用Holo主题,您必须将清单中的构建目标设置为API级别11或更高级别,您还必须将包含Holo主题的style.xml文件到文件夹values-v11

只需删除HOLO,因为该资源不适用于该API级别

        parent="android:Theme.Light"

将manifest的android:targetSdkVersion值更改为正确的版本为我解决了它。

I have faced a similar issue even with the correct settings in Properties etc. It seems a problem with Eclipse. 即使使用属性等中的正确设置,我也遇到了类似的问题。这似乎是Eclipse的一个问题。 I have removed the content of the xml files, then "save", then enter again the values ie 我删除了xml文件的内容,然后“保存”,然后再次输入值即

<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">

and "save" again. 并再次“保存”。

你准确写了吗?

<item name="android:listViewStyle"> 

I resolved the same issue by adding 我通过添加解决了同样的问题

 android:theme="@style/AppTheme"    

within application tag in the AndroidManifest.xml file. 在AndroidManifest.xml文件中的application标记内。 This will recognize the app theme. 这将识别应用主题。

<application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" 
        android:debuggable="true" > 
        <activity 
            ...
        </activity>
      ...
</application>

暂无
暂无

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

相关问题 检索项目的父项时出错:找不到与给定名称@ style / Theme.Holo匹配的资源 - Error retrieving parent for item:No resource found that matches the given name @style/Theme.Holo 键入错误:检索项目的父项时出错:未找到与给定名称&#39;android:Theme.Holo.Light&#39;相匹配的资源。 - Type error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'. 错误:检索父项时出错:找不到与给定名称&#39;android:Theme.Holo.Light.DarkActionBar&#39;匹配的资源 - error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar' 找不到与给定名称“android:Theme.Holo”匹配的资源。 android API 9 - No resource found that matches the given name 'android:Theme.Holo'. android API 9 错误:检索项目父项时出错:找不到与给定名称&#39;android:Theme.DeviceDefault.Light&#39;相匹配的资源 - error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.DeviceDefault.Light' 检索项目的父项时出错:找不到与给定名称匹配的资源'@android:style / TextAppearance.Holo.Widget.ActionBar.Title' - Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title' 检索父项时出错:找不到与给定名称android相匹配的资源 - Error retrieving parent for item: No resource found that matches the given name android 检索项目的父项时出错:找不到与给定名称匹配的资源&#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' 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' 检索项目的父项的 Android 错误:找不到与给定名称匹配的资源 - Android Error retrieving parent for item: No resource found that matches the given name
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM