安卓开发空指针问题!求助!? 400 报错
本人新手,只能看出是空指针问题不清楚具体是哪里出错了~!求高手帮忙,感激不尽!!
下面是logcat的信息!!
10-16 09:40:26.103: E/AndroidRuntime(367): FATAL EXCEPTION: main
10-16 09:40:26.103: E/AndroidRuntime(367): java.lang.RuntimeException: Unable to start activity ComponentInfo{Li.xiaocai.zj/Li.xiaocai.zj.MainActivity}: java.lang.NullPointerException
10-16 09:40:26.103: E/AndroidRuntime(367): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
10-16 09:40:26.103: E/AndroidRuntime(367): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
10-16 09:40:26.103: E/AndroidRuntime(367): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
10-16 09:40:26.103: E/AndroidRuntime(367): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
10-16 09:40:26.103: E/AndroidRuntime(367): at android.os.Handler.dispatchMessage(Handler.java:99)
10-16 09:40:26.103: E/AndroidRuntime(367): at android.os.Looper.loop(Looper.java:130)
10-16 09:40:26.103: E/AndroidRuntime(367): at android.app.ActivityThread.main(ActivityThread.java:3683)
10-16 09:40:26.103: E/AndroidRuntime(367): at java.lang.reflect.Method.invokeNative(Native Method)
10-16 09:40:26.103: E/AndroidRuntime(367): at java.lang.reflect.Method.invoke(Method.java:507)
10-16 09:40:26.103: E/AndroidRuntime(367): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
10-16 09:40:26.103: E/AndroidRuntime(367): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
10-16 09:40:26.103: E/AndroidRuntime(367): at dalvik.system.NativeStart.main(Native Method)
10-16 09:40:26.103: E/AndroidRuntime(367): Caused by: java.lang.NullPointerException
10-16 09:40:26.103: E/AndroidRuntime(367): at Li.xiaocai.zj.MainActivity.onCreate(MainActivity.java:58)
10-16 09:40:26.103: E/AndroidRuntime(367): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-16 09:40:26.103: E/AndroidRuntime(367): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
10-16 09:40:26.103: E/AndroidRuntime(367): ... 11 more