android - 找不到资源 - Theme.AppCompat.Light.DarkActionBar

标签 android android-actionbar-compat

我使用了 ActionBar 样式生成器,现在尝试在我的应用中使用,但得到:

error: Error retrieving parent for item: No resource found that matches the given name '@style/ Theme.AppCompat.Light.DarkActionBar'.

我在 libs 文件夹中使用 android-support-v7-appcompat.jar lib

我的目标是让我的应用兼容 2.3 或更高版本

最佳答案

AppCompat 是一个库项目。你需要在你的android项目中引用库项目。

查看主题Adding libraries with resources .

更新

添加 Material 主题应该是方式。查看 https://material.io/develop/android/docs/getting-started了解更多详情。

关于android - 找不到资源 - Theme.AppCompat.Light.DarkActionBar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21900853/

相关文章:

android - Lollipop 版本以下 android 中的 Per App VPN 功能

android - 使用 XML 可绘制的垂直线

android - 以编程方式更改样式中的颜色值android

android - 操作栏检测 fragment 中的后退按钮单击

android - Urban Airship Android推送获取 "This app is not configured for iOS push"

android - MediaPlayer 应该在单独的线程中运行吗?

android - 从 ActionBarSherlock 迁移到 ActionBarCompat 时有哪些常见问题?

java - 使用 AppCompat 库支持 ActionBar

android - 在对其应用自定义 View 之前,actionbar 会显示一段时间

android - 使用带有新工具栏的选项卡 (AppCompat v7-21)