[英]Android Studio - Error: No resource found that matches the given name: attr 'metaButtonBarButtonStyle'
I`m experiencing a weird problem.... 我遇到了一个奇怪的问题....
/res/all/debug/values/values.xml:877: error: Error: No resource found that matches the given name: attr 'metaButtonBarButtonStyle'. /res/all/debug/values/values.xml:877:错误:错误:找不到与给定名称匹配的资源:attr'metaButtonBarButtonStyle'。
In theory all the sdk`s and add-ons are ok. 从理论上讲,所有sdk和附加组件都可以。 Does anybody have an idea what might be?
有人知道可能是什么吗? ----build.gradle-- Using sdk 19.
---- build.gradle--使用sdk 19。
repositories {
mavenCentral()
}
apply plugin: 'android'
dependencies {
compile 'com.squareup:otto:1.3.4'
compile 'com.squareup.dagger:dagger:1.0.1'
compile files('libs/volley.jar')
compile files('libs/android-async-http-1.4.4.jar')
compile 'com.android.support:support-v4:19.1.0'
compile 'com.google.android.gms:play-services:4.4.52'
compile 'com.android.support:appcompat-v7:19.1.0'
}
android {
compileSdkVersion 19
buildToolsVersion "19.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 19
}
}
Toady,I also read Android sample full screen Demo,I find same problem with you. Toady,我还看了Android样本全屏Demo,我发现跟你一样的问题。 when I read all res files ,I understand.I can write same code with demo ,without problems .there are some steps: 1.create you own styles file and write it: sample:
当我读取所有res文件时,我理解。我可以用demo编写相同的代码,没有问题。有一些步骤:1。创建自己的样式文件并编写它:sample:
<!-- Backward-compatible version of ?android:attr/buttonBarStyle -->
<style name=\"btnbar\">`enter code here`
<item name="android:paddingLeft">2dp</item>
<item name="android:paddingTop">5dp</item>
<item name="android:paddingRight">2dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="android:background">@android:drawable/bottom_bar</item>
</style>
2. create attrs.xml,and write it with ButtonBar attr.sample is that: 2. 创建attrs.xml,并用ButtonBar attr.sample写它是:
<!-- Backward-compatible version of ?android:attr/buttonBarStyle -->
enter code here 2dp 5dp 2dp 0dp
<declare-styleable name="ButtonBarContainerTheme">
<attr name="metaButtonBarStyle" format="reference" />
<attr name="metaButtonBarButtonStyle" format="reference" />
</declare-styleable>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.