完整错误:
Error:Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.AppCompat.Light.ActionBar'.
我尝试更改操作栏的颜色,我引用了http://android-developers.blogspot.in/2013/08/actionbarcompat-and-io-2013-app-source.html。
我尝试过增加最小api,但是没有帮助。
我也看过这个问题:Can't Find Theme.AppCompat.Light for New Android ActionBar Support
但我不知道如何在Android Studio中执行此操作
<!-- Customize your theme here. -->
<style name="Theme.Styled" parent="@style/Theme.AppCompat.Light">
<!-- Setting values in the default namespace affects API levels 7-13 -->
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>
<style name="Widget.Styled.ActionBar" parent="@android:style/Widget.AppCompat.Light.ActionBar">
<item name="android:background">0xff5a00</item>
</style>
答案 0 :(得分:1)
这意味着您没有使用AppCompat库,而是使用本机ActionBar样式。
<强>样品:强>
<style name="Widget.Styled.ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">