Android appcompat-v7 themes_base.xml找不到资源错误

时间:2015-05-20 21:31:47

标签: android android-support-library android-appcompat

我一直在尝试将appcompat-v7导入到我的应用中,并且根本没有运气。我需要此库才能按照此处列出的步骤How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?进行操作。我已经按照记录的https://developer.android.com/tools/support-library/setup.html步骤进行了操作,当我将库添加到项目中时,我得到了一个错误列表:

.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:136: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:140: error: Error: No resource found that matches the given name: attr 'android:colorButtonNormal'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:138: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:139: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:134: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:144: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:148: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.

我有针对android-support-v7-appcompat的API 21的构建目标。当我清理该项目时,我没有收到任何错误。当我将appcompat-v7作为库添加到我的项目时,这就是错误开始出现的地方。

我已经检查了我的SDK管理器,一切都是最新的。任何人都可以帮助引导我朝着正确的方向指导我解决这个问题吗?

0 个答案:

没有答案