简体   繁体   English

删除找不到Sherlock Actionbar库主题

[英]Removing Sherlock Actionbar library Theme not found

I have removed the ActionBarSherlock library and adapted my code. 我删除了ActionBarSherlock库,并修改了我的代码。 Now I get errors in my style.xml 现在我的style.xml中出现错误

<style name="Theme.MyTheme" parent="Theme.Sherlock.Light">

What do I have to use instead of the Sherlock.light theme? 我必须使用什么代替Sherlock.light主题?

If you are migrating to appcompat-v7 , you need to migrate all Sherlock references to their corresponding AppCompat equivalents. 如果要迁移到appcompat-v7 ,则需要将所有Sherlock引用迁移到其对应的AppCompat等效项。 This includes switching custom themes to inherit from Theme.AppCompat (eg, Theme.AppCompat.Light ). 这包括切换自定义主题以继承自Theme.AppCompat (例如Theme.AppCompat.Light )。

You might consider installing Android Studio, then creating a scrap project using the new-project wizard. 您可以考虑安装Android Studio,然后使用new-project向导创建一个scrap项目。 The defaults will use appcompat-v7 , and you can examine the newly-created project to see what it uses, to help you determine how to change your Sherlock references. 默认值将使用appcompat-v7 ,您可以检查新创建的项目以查看其用途,以帮助您确定如何更改Sherlock引用。

If you are using AppCompat library, use AppCompat.Light 如果使用的是AppCompat库,请使用AppCompat.Light

@style/Theme.AppCompat.Light @ style / Theme.AppCompat.Light

else Try using Holo.Light. 否则尝试使用Holo.Light。

@android:style/Theme.Holo.Light @android:style / Theme.Holo.Light

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM