错误:错误:没有资源的发现,匹配给定的名字:ATTR“buttonBarButtonStyle” [英] error: Error: No resource found that matches the given name: attr 'buttonBarButtonStyle'

查看:554
本文介绍了错误:错误:没有资源的发现,匹配给定的名字:ATTR“buttonBarButtonStyle”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写在styles.xml文件中的主题,像下面

I write a theme in styles.xml file like below

<?xml version="1.0" encoding="utf-8"?>
<resources>
 <!-- Root styles that vary by API level -->
<style name="FrameworkRoot.Theme" parent="Theme.Sherlock.Light.DarkActionBar">
    <!-- API 11+ (compatibility) -->
    <item name="buttonBarStyle">@style/Compat.ButtonBar</item>
    <item name="buttonBarButtonStyle">@style/Compat.ButtonBarButton</item>
    <item name="indeterminateProgressStyle">@style/Compat.IndeterminateProgress</item>
    <!-- API 14+ (compatibility) -->
    <item name="listPreferredItemPaddingLeft">@dimen/compat_list_preferred_item_padding_left</item>
    <item name="listPreferredItemPaddingRight">@dimen/compat_list_preferred_item_padding_right</item>
    <item name="listPreferredItemHeightSmall">@dimen/compat_list_preferred_item_height_small</item>
</style>

但得到的错误:错误:未发现的资源匹配给定名称:ATTRbuttonBarStyle

but get the error: Error: No resource found that matches the given name: attr 'buttonBarStyle'.

我从谷歌io2012的code。无论井下及其所有基础

I get the code from the google io2012. Both mine and its' all base

    <uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="16" />

我可以编译谷歌io2012源$ C ​​$ C,但不是我的。这么奇怪。 是否有人知道为什么吗?还是有同样的问题?

I can compile the google io2012's source code but not mine. so strange. is anybody know why? or have the same question?

推荐答案

buttonBarStyle 是版本11及以上,你在你的SDK状态,但使用的是安卓的minSdkVersion =8。是不是它应该工作安卓的minSdkVersion =11

buttonBarStyle is for versions 11 and above as you state in your SDK but you are using android:minSdkVersion="8". Isn't it supposed to work for android:minSdkVersion="11"?

这篇关于错误:错误:没有资源的发现,匹配给定的名字:ATTR“buttonBarButtonStyle”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆