【问题标题】:Appcompat style error in Android Studio 0.8.2 (beta)Android Studio 0.8.2(测试版)中的 Appcompat 样式错误
【发布时间】: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


【解决方案1】:

我有同样的问题,但对我来说这是唯一的 IDE 问题。当我运行应用程序时,它使用正确的主题

【讨论】:

    猜你喜欢
    • 2018-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-30
    • 1970-01-01
    • 1970-01-01
    • 2015-05-30
    • 2014-10-13
    相关资源
    最近更新 更多