继续获取找不到与给定名称“Theme.AppCompat.Light.DarkActionBar”匹配的资源

时间:2015-06-07 17:16:26

标签: android ant android-studio

我正在尝试在模拟器上安装我的应用。根据{{​​3}},我应该这样做:

ant debug
adb install bin/MyFirstApp-debug.apk

但是ant debug给了我这个错误:

No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

我读了一些帖子并做了他们的建议。即:

1. I checked that Android Support Repository is installed in SDK Manager.
2. Included the following in my build.gradle file:

compile 'com.android.support:appcompat-v7:22.2.0'
compile fileTree(include: ['*.jar'], dir: 'libs')

仍然会出现同样的错误。

我该如何解决?

更新:

我的styles.xml:

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
    </style>

</resources>

0 个答案:

没有答案