我正在 Eclipce 中为 android 编写程序。
我遇到了错误调试问题,当错误发生时,例如NullPointerExceptioin我可以看到,记录双击(在日志上)不起作用?据我所知,它应该向我显示代码中发生异常的行。有人知道如何解决这个问题吗?
10-27 20:28:41.202: E/AndroidRuntime(3232): FATAL EXCEPTION: main
10-27 20:28:41.202: E/AndroidRuntime(3232): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bignerdranch.andriod.geoquiz/com.bignerdranch.andriod.geoquiz.QuizActivity}: java.lang.NullPointerException
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.os.Handler.dispatchMessage(Handler.java:99)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.os.Looper.loop(Looper.java:137)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.app.ActivityThread.main(ActivityThread.java:5039)
10-27 20:28:41.202: E/AndroidRuntime(3232): at java.lang.reflect.Method.invokeNative(Native Method)
10-27 20:28:41.202: E/AndroidRuntime(3232): at java.lang.reflect.Method.invoke(Method.java:511)
10-27 20:28:41.202: E/AndroidRuntime(3232): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
10-27 20:28:41.202: E/AndroidRuntime(3232): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
10-27 20:28:41.202: E/AndroidRuntime(3232): at dalvik.system.NativeStart.main(Native Method)
10-27 20:28:41.202: E/AndroidRuntime(3232): Caused by: java.lang.NullPointerException
10-27 20:28:41.202: E/AndroidRuntime(3232): at com.bignerdranch.andriod.geoquiz.QuizActivity.onCreate(QuizActivity.java:57)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.app.Activity.performCreate(Activity.java:5104)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
10-27 20:28:41.202: E/AndroidRuntime(3232): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
10-27 20:28:41.202: E/AndroidRuntime(3232): ... 11 more
我不能点击任何地方。