1

我收到了一些崩溃报告,如下所示

java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.

我检查了我的清单文件,它正确设置了主题

<application
        android:allowBackup="true"
        android:icon="@drawable/logo"
        android:label="XXX"
        android:theme="@style/Theme.Sherlock.Light.DarkActionBar" 
        android:name="com.XXX.myapp">
        <activity
            android:name="XXX"
            android:label="XXX"
            android:configChanges="orientation|screenSize"            
            android:launchMode="singleTop" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

有谁知道问题是什么?

当我查看 ABS 时,它似乎在这里失败了

if (!a.hasValue(R.styleable.SherlockTheme_windowActionBar)) {
            throw new IllegalStateException("You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.");
        }
4

0 回答 0