1
我剛開始使用操作欄和標籤導航。應用程序運行良好,但手機進入睡眠狀態時出現問題,我將其喚醒,然後進入下一個選項卡,我得到此異常,我不知道該在哪裏尋找。例外情況是:
Action Bar Sherlock和一些愚蠢的異常
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)
我錯過了logcat中'由'引起的聲明。這是全部嗎? – RvdK 2013-03-07 10:23:43
這就是全部......這使我迷惑...... – Jovan 2013-03-07 10:25:21
第一件事,它是愚蠢的,不stuppid .. :-)第二件事,[這](https://github.com/JakeWharton/ActionBarSherlock/issues/ 652)在他們的github頁面報告的錯誤看起來類似,他們告訴一個修復..可能會幫助你.. – Krishnabhadra 2013-03-07 10:25:25