android - 错误 : Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'

标签 android themes

Error: No resource found that matches the given name: attr 'listViewStyle'

我已经尝试了这里的一切。没有任何效果。

我已将 API 演示导入 API 版本 15 的 Eclipse,并且还在 src 文件中出现错误,例如“无法解析导入 com.example.android.apis.R”

请帮帮我。

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

而且我在 values/styles.xml 中有一个错误“错误:检索项目的父项时出错:找不到与给定名称'@android:style/Theme.Holo.Light.NoActionBar'匹配的资源。”在以下几行中

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

最佳答案

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

关于android - 错误 : Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12295018/

相关文章:

适用于 Java 的 Eclipse IDE - 全深色主题

android - 如何在 asynctask 中处理 UI?

android - 融合位置提供程序意外行为

android - 如何在 Eclipse 中包含 Android gradle 依赖项

button - 如何在Flutter中更改按钮主题的文字颜色

php - 是否可以更改 wordpress 在帖子中添加时显示图像的方式?

Android - 无法将图库图像设置为 ImageView

android - 在 Android 模拟器中运行 ionic 应用程序。

css - 如何在不复制 mixins 的情况下将自定义 Material 主题包含到组件中 : mat-core and angular-material-theme

javascript - 大量主题的可维护 CSS