错误:错误:没有资源的发现,匹配给定的名字: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"
?