没有资源发现,匹配给定名称Theme.Sherlock.Dialog [英] no resource found that matches the given name Theme.Sherlock.Dialog

查看:558
本文介绍了没有资源发现,匹配给定名称Theme.Sherlock.Dialog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安卓2.3.3

我寻觅所以对于一个解决方案,但我无法理解提供的解决方案。如果有人能就如何摆脱这种错误的一个简单的方法解释,我就谢天谢地了。

I have searched SO for a solution, but I couldn't understand the solutions given. If someone can explain in a simple way on how to get rid of this error, I would be thankful.

我使用ActionBarSherlock在我的应用程序。我的基本主题, Theme.Sherlock.Light ,正常工作与所有活动。对于一个活动,我希望我的行为看起来像一个对话框,所以我想用 Theme.Sherlock.Dialog

I am using ActionBarSherlock in my application. My basic theme, Theme.Sherlock.Light, works fine with all the activities. For one activity, I want my activity to look like a dialog and hence I wanted to use Theme.Sherlock.Dialog.

下面是我的清单文件中的声明。

Here is my manifest file's declaration.

<activity
    android:name="com.xxx.xx.x.Activity"
     android:theme="@style/Theme.Sherlock.Dialog" >
</activity>

不过,我在我的XML以下错误:错误:错误:未发现的资源匹配给定名称(在主题,值为@风格/ Theme.Sherlock.Dialog)。 。为什么会出现这个?我应该怎么做,删除此?

But I get the following error in my XML : error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.Sherlock.Dialog').. Why am I getting this? What should I do, to remove this?

推荐答案

对话主题ActionBarSherlock被JakeWharton除去四个多月前。

Dialog themes in ActionBarSherlock were removed by JakeWharton over four months ago.

<一个href="https://github.com/JakeWharton/ActionBarSherlock/commit/601bde214b56b8fad0b4fc5aaed5af0b531b6135">https://github.com/JakeWharton/ActionBarSherlock/commit/601bde214b56b8fad0b4fc5aaed5af0b531b6135

只需使用 @android:款式/ Theme.Dialog 并延长活动而不是 SherlockActivity 。 ActionBarSherlock没有做任何事情的对话,它会,如果你不使用一个,如果它的主题,只是抱怨。

Just use @android:style/Theme.Dialog and extend Activity instead of SherlockActivity. ActionBarSherlock doesn't do anything for dialogs and it will just complain if you're not using one if its themes.

这篇关于没有资源发现,匹配给定名称Theme.Sherlock.Dialog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆