Action Bar Sherlock和一些愚蠢的例外

时间:2013-03-07 10:20:21

标签: android android-fragments actionbarsherlock actionbarsherlock-map


我刚开始使用操作栏和标签导航。应用程序运行良好,但我有问题,当手机进入睡眠状态时,我将其唤醒,然后我转到下一个选项卡,我得到这个例外,我不知道在哪里看。例外情况是:

03-07 11:16:57.026: E/AndroidRuntime(20228): FATAL EXCEPTION: main
03-07 11:16:57.026: E/AndroidRuntime(20228): java.lang.NullPointerException
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.view.View.dispatchRestoreInstanceState(View.java:6326)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.view.View.restoreHierarchyState(View.java:6310)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at com.actionbarsherlock.internal.view.menu.MenuBuilder.restoreActionViewStates(MenuBuilder.java:361)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at com.actionbarsherlock.internal.ActionBarSherlockCompat.preparePanel(ActionBarSherlockCompat.java:503)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at com.actionbarsherlock.internal.ActionBarSherlockCompat.dispatchInvalidateOptionsMenu(ActionBarSherlockCompat.java:272)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at com.actionbarsherlock.app.SherlockFragmentActivity.invalidateOptionsMenu(SherlockFragmentActivity.java:150)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at com.actionbarsherlock.app.SherlockFragmentActivity.supportInvalidateOptionsMenu(SherlockFragmentActivity.java:156)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1100)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:429)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.os.Handler.handleCallback(Handler.java:587)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.os.Handler.dispatchMessage(Handler.java:92)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.os.Looper.loop(Looper.java:130)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at android.app.ActivityThread.main(ActivityThread.java:3687)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at java.lang.reflect.Method.invokeNative(Native Method)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at java.lang.reflect.Method.invoke(Method.java:507)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
03-07 11:16:57.026: E/AndroidRuntime(20228):    at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:0)

这似乎是ActionBarSherlock实现中的一个错误。请参阅有关错误here的讨论。 有人上传了补丁here。检查这是否适合你。