【发布时间】:2014-07-29 21:34:49
【问题描述】:
我已经检查过以前关于 Appcompat 资源未找到问题的问题,但没有一个问题能解决我的问题。我已将 appcompat 20.0 作为库添加到我的项目中,并检查它是否在外部库文件夹中。我还检查了 build.gradle 中的依赖项,它也在那里。但是每当我尝试在样式文件中创建新样式时,IDE 都找不到@style/Theme.AppCompat.Light。有什么建议吗?
我正在尝试做的事情(给出错误)
<style name="Theme.myactionbar" parent="@style/Theme.AppCompat.Light">
...
items
...
</style>
另一方面,我可以轻松地从应用程序标签下的清单中启用主题
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light"
【问题讨论】:
-
appcompat 20.0 还没有被 AndroidStudio 完全支持,我在 20.0 版本中有很多错误。如果您尝试使用支持 20.0 的库编译项目会出现很多错误,设计器将无法使用 20.0。
标签: android android-studio android-appcompat android-actionbar-compat