我正在尝试在我的项目中实现支持库 v7,但遇到了与其 bundle 的样式问题。
Error:(2) Error retrieving parent for item:
No resource found that matches the given name
'Theme.AppCompat.Light.DarkActionBar.'.
我已经在我的 build.gradle 中包含了 com.android.support:appcompat-v7:23.1.1,但它没有帮助。
这是我的 build.gradle 依赖项
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:support-annotations:+'
compile 'com.android.support:appcompat-v7:23.1.1'
}
这是我的 styles.xml,它导致了错误
<resources>
<style name="AppBaseTheme" parent="android:Theme.Light"> </style>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar."></style>
<!-- erorr here -->
</resources>
我使用的是 Android Studio 1.4,buildToolsVersion 为“23.0.2”。
最佳答案
您的风格有错误。 删除点。
Theme.AppCompat.Light.DarkActionBar
而不是
Theme.AppCompat.Light.DarkActionBar.
关于java - 在 android 中实现支持库 v7 中的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33796931/