在Android 4.3及以下版本中同时按钮单击时出现空指针异常

时间:2014-09-25 00:07:56

标签: android-fragments nullpointerexception

我在Android 4.3及以下版本的布局中有两个按钮。我一次点击它们进行测试。我在某些时候引起了空指针异常。有时候它完美运行..这不会出现在Android 4.4中。这是我添加日志。

﹕ Second Button Clicked for ...100
/Choreographer﹕ Already have a pending vsync event.  There should only be one at a time.
﹕First Button Clicked for ...100
﹕ Called from Fragment
AbsListView﹕ unregisterIRListener() is called
ViewRootImpl﹕ sendUserActionEvent() mView == null
: I/Is this a 10 inch tablet?﹕ false
AbsListView﹕ unregisterIRListener() is called
AndroidRuntime﹕ Shutting down VM
dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41c5e700)
AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.NullPointerException
            at android.app.BackStackRecord.run(BackStackRecord.java:651)
            at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1455)
            at android.app.FragmentManagerImpl$1.run(FragmentManager.java:441)
            at android.os.Handler.handleCallback(Handler.java:730)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:5493)
            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:1209)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025)
            at dalvik.system.NativeStart.main(Native Method)

请帮我解决这个问题。

0 个答案:

没有答案