android.support.v4.app.FragmentManagerImpl.makeInactive中的NullPointer异常

时间:2012-09-12 18:46:03

标签: android android-fragments

我在Android支持库中看到一个奇怪的异常 - 堆栈跟踪如下。可能导致这种情况的任何想法?我无法在我的任何设备上重现异常,但Google Play DevConsole中似乎有很多可见的内容。

java.lang.NullPointerException
at android.support.v4.app.FragmentManagerImpl.makeInactive(FragmentManager.java:1133)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1044)
at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1171)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:582)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1416)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:420)
at android.os.Handler.handleCallback(Handler.java:608)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:5045)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:1)

尝试检查堆栈片段及时旋转屏幕,例如onResume。