在实时应用中,我收到以下崩溃报告:
java.lang.NullPointerException
at android.support.v7.app.ActionBarImplICS.getThemedContext(ActionBarImplICS.java:302)
at android.support.v7.app.ActionBarImplJB.getThemedContext(ActionBarImplJB.java:20)
at android.support.v7.app.ActionBarActivityDelegate.getActionBarThemedContext(ActionBarActivityDelegate.java:210)
at android.support.v7.app.ActionBarActivityDelegate.getMenuInflater(ActionBarActivityDelegate.java:100)
at android.support.v7.app.ActionBarActivity.getMenuInflater(ActionBarActivity.java:72)
at android.app.Activity.onCreatePanelMenu(Activity.java:2579)
at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:225)
at android.support.v7.app.ActionBarActivity.superOnCreatePanelMenu(ActionBarActivity.java:233)
at android.support.v7.app.ActionBarActivityDelegateICS.onCreatePanelMenu(ActionBarActivityDelegateICS.java:146)
at android.support.v7.app.ActionBarActivity.onCreatePanelMenu(ActionBarActivity.java:200)
at android.support.v7.app.ActionBarActivityDelegateICS$WindowCallbackWrapper.onCreatePanelMenu(ActionBarActivityDelegateICS.java:293)
at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:507)
at com.android.internal.policy.impl.PhoneWindow.onKeyDownPanel(PhoneWindow.java:964)
at com.android.internal.policy.impl.PhoneWindow.onKeyDown(PhoneWindow.java:1670)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2227)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4562)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4538)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4143)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4193)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4162)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4247)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4170)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4304)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4143)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4193)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4162)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4170)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4143)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4193)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4162)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4280)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:4430)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2223)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1895)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1886)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2200)
at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:132)
at android.os.Looper.loop(Looper.java:124)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
at dalvik.system.NativeStart.main(Native Method)
它似乎只来自某些类型的设备:三星Galaxy S4,Note(II和3)和Tab3 Lite。
从堆栈跟踪中我只能看到这似乎与菜单创建有关。任何人都可以帮我理解这里发生了什么?