我的应用程序有时会在三星手机上崩溃:“java.lang.NullPointerException”,但它在任何地方都没有引用我的代码。我能做些什么来避免这个错误?
java.lang.NullPointerException
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2476)
at android.app.ActivityThread.access$1800(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:952)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)