没有资源发现,匹配给定名称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.
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.