这是LogCat:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.---.---/com.---.---.ManageDebts}: java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1815)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
at android.app.ActivityThread.access$500(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.
at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:1003)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:915)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:849)
at com.actionbarsherlock.app.SherlockListActivity.setContentView(SherlockListActivity.java:229)
at com.kickinglettuce.debtplanner.ManageDebts.onCreate(ManageDebts.java:70)
at android.app.Activity.performCreate(Activity.java:4397)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
... 11 more
它说我需要使用特定的 Sherlock 主题,好吧,这就是我正在做的事情:
在清单中:
<application
android:theme="@style/DPFTheme" >
Res 文件夹值/样式:
<style name="DPFTheme" parent="@style/Theme.Sherlock.Light" />
Res 文件夹 Values-v11/Styles:
我相信我已经涵盖了所有基础。还是我?
<style name="DPFTheme" parent="@android:style/Theme.Holo.Light" />
现在,这个应用程序有几千个用户,我只看到这个错误大约 5 次左右。所以也许它是特定于设备的?我不知道。