简体   繁体   English

Android Studio 0.8.2(测试版)中的Appcompat样式错误

[英]Appcompat style error in Android Studio 0.8.2 (beta)

I' ve checked previous questions about Appcompat resource not found questions but non of them solves my problem. 我已经检查了有关Appcompat资源的先前问题,但未找到问题,但没有一个解决了我的问题。 I've added appcompat 20.0 to my project as a library and checked whether it is in external libraries folder or not. 我已将appcompat 20.0作为库添加到我的项目中,并检查它是否在外部库文件夹中。 I 've also checked dependencies in build.gradle and it is also there .But whenever I try to create new style in styles file IDE cannot find @style/Theme.AppCompat.Light. 我还检查了build.gradle中的依赖项,它也在那里。但是,每当我尝试在样式文件中创建新样式时,IDE都找不到@ style / Theme.AppCompat.Light。 Any Suggestions ? 有什么建议么 ?

what I am trying to do (gives errors) 我要做什么(给出错误)

<style name="Theme.myactionbar" parent="@style/Theme.AppCompat.Light">
    ...
    items
    ...      
</style>

On the other hand ,I can easily enable theme from manifest under application tag without problem 另一方面,我可以轻松地从应用程序标签下的清单中启用主题,而不会出现问题

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:screenOrientation="portrait"
    android:theme="@style/Theme.AppCompat.Light"

I have same issue but for me its only IDE issue. 我有同样的问题,但对我来说,这是唯一的IDE问题。 When I run the app it work with right theme 当我运行该应用程序时,它可以正确使用主题

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM