我一直在犯错误,这次我找不到问题。有人说 logcat 会显示有问题的行号,但是,我还没有找到这个很棒的资源。这是显示当我拉出键盘时应用程序崩溃时出现的错误的 logcat。
06-14 10:04:42.734: E/AndroidRuntime(29547): FATAL EXCEPTION: main
06-14 10:04:42.734: E/AndroidRuntime(29547): java.lang.NullPointerException
06-14 10:04:42.734: E/AndroidRuntime(29547): at com.daniel.kilometermilecoverter.MainActivity.onConfigurationChanged(MainActivity.java:171)
06-14 10:04:42.734: E/AndroidRuntime(29547): at android.app.ActivityThread.performConfigurationChanged(ActivityThread.java:2956)
06-14 10:04:42.734: E/AndroidRuntime(29547): at android.app.ActivityThread.handleConfigurationChanged(ActivityThread.java:3049)
06-14 10:04:42.734: E/AndroidRuntime(29547): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1015)
06-14 10:04:42.734: E/AndroidRuntime(29547): at android.os.Handler.dispatchMessage(Handler.java:99)
06-14 10:04:42.734: E/AndroidRuntime(29547): at android.os.Looper.loop(Looper.java:130)
06-14 10:04:42.734: E/AndroidRuntime(29547): at android.app.ActivityThread.main(ActivityThread.java:3740)
06-14 10:04:42.734: E/AndroidRuntime(29547): at java.lang.reflect.Method.invokeNative(Native Method)
06-14 10:04:42.734: E/AndroidRuntime(29547): at java.lang.reflect.Method.invoke(Method.java:507)
06-14 10:04:42.734: E/AndroidRuntime(29547): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
06-14 10:04:42.734: E/AndroidRuntime(29547): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
06-14 10:04:42.734: E/AndroidRuntime(29547): at dalvik.system.NativeStart.main(Native Method)
06-14 10:04:42.744: E/AndroidRuntime(29547): [FRANDRO_ERR_HANDLER] com_android_internal_os_RuntimeInit_BlueErrorHandler
06-14 10:04:42.744: E/AndroidRuntime(29547): [Blue Error Handler] Make Debugging Report file for main
06-14 10:04:42.744: E/AndroidRuntime(29547): java.lang.NullPointerException
06-14 10:04:42.744: E/AndroidRuntime(29547): at com.daniel.kilometermilecoverter.MainActivity.onConfigurationChanged(MainActivity.java:171)
06-14 10:04:42.744: E/AndroidRuntime(29547): at android.app.ActivityThread.performConfigurationChanged(ActivityThread.java:2956)
06-14 10:04:42.744: E/AndroidRuntime(29547): at android.app.ActivityThread.handleConfigurationChanged(ActivityThread.java:3049)
06-14 10:04:42.744: E/AndroidRuntime(29547): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1015)
06-14 10:04:42.744: E/AndroidRuntime(29547): at android.os.Handler.dispatchMessage(Handler.java:99)
06-14 10:04:42.744: E/AndroidRuntime(29547): at android.os.Looper.loop(Looper.java:130)
06-14 10:04:42.744: E/AndroidRuntime(29547): at android.app.ActivityThread.main(ActivityThread.java:3740)
06-14 10:04:42.744: E/AndroidRuntime(29547): at java.lang.reflect.Method.invokeNative(Native Method)
06-14 10:04:42.744: E/AndroidRuntime(29547): at java.lang.reflect.Method.invoke(Method.java:507)
06-14 10:04:42.744: E/AndroidRuntime(29547): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
06-14 10:04:42.744: E/AndroidRuntime(29547): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
06-14 10:04:42.744: E/AndroidRuntime(29547): at dalvik.system.NativeStart.main(Native Method)
06-14 10:04:44.766: E/AndroidRuntime(29547): [FRANDRO_ERR_HANDLER] Done.