在 android 中实现支持库 v7 中的样式

Implementing styles from Support Library v7 in android

我正在尝试在我的项目中实施支持库 v7,但与它捆绑在一起的样式存在问题。

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 with buildToolsVersion '23.0.2'。

您的风格有错字。 删除点。

Theme.AppCompat.Light.DarkActionBar

而不是

Theme.AppCompat.Light.DarkActionBar.