【发布时间】:2015-05-30 21:14:43
【问题描述】:
我最初使用compile 'com.android.support:appcompat-v7:19.0.1',我决定实现DrawerLayout。不幸的是,我被告知 v4 支持库的 ActionBarDrawerToggle 已弃用,并使用 v7 版本。看来这不在19.0.1版本的support-v7-appcompat中,所以我决定升级到compile 'com.android.support:appcompat-v7:21.0.0'。但是,现在我的样式出现以下错误:
Error:Error retrieving parent for item: No resource found that matches the given name '@style/Widget.AppCompat.Light.Base.ActionBar.TabBar.Inverse'.
(还有一些其他的)。
我尝试了一些方法,包括:
- Error in styles_base.xml file - android app - No resource found that matches the given name 'android:Widget.Material.ActionButton'
- Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title'
我的build.gradle有如下配置:
defaultConfig {
minSdkVersion 11
targetSdkVersion 17
}
【问题讨论】:
-
材料仅适用于 21 岁以上。 Holo 仅适用于 11 岁以上。 ActionBar 选项卡在 v20+ 中已被弃用。您应该始终保持您的应用程序是最新的。现在是您进行重大更新的时候了。
-
我们正在进行重大更新,但我们一次只做一件事 - 现在,我们正在处理的事情是导航抽屉。 ;)
-
其他一些东西,
com.android.support:appcompat-v7:22.0.0是最新的。您应该始终以最新设备为目标targetSdkVersion应设置为 22。
标签: android android-support-library android-appcompat