是按照《第一行代碼》寫的,改成跟書上一模一樣還出現這個,求指導
03-15 05:31:41.660: D/gralloc_goldfish(1692): Emulator without GPU emulation detected.
03-15 05:31:45.230: D/AndroidRuntime(1692): Shutting down VM
03-15 05:31:45.230: W/dalvikvm(1692): threadid=1: thread exiting with uncaught exception (group=0xb4abfba8)
03-15 05:31:45.280: E/AndroidRuntime(1692): FATAL EXCEPTION: main
03-15 05:31:45.280: E/AndroidRuntime(1692): Process: com.example.uiwidgettest, PID: 1692
03-15 05:31:45.280: E/AndroidRuntime(1692): java.lang.NullPointerException
03-15 05:31:45.280: E/AndroidRuntime(1692): at com.example.uiwidgettest.MainActivity.onClick(MainActivity.java:48)
03-15 05:31:45.280: E/AndroidRuntime(1692): at android.view.View.performClick(View.java:4438)
03-15 05:31:45.280: E/AndroidRuntime(1692): at android.view.View$PerformClick.run(View.java:18422)
03-15 05:31:45.280: E/AndroidRuntime(1692): at android.os.Handler.handleCallback(Handler.java:733)
03-15 05:31:45.280: E/AndroidRuntime(1692): at android.os.Handler.dispatchMessage(Handler.java:95)
03-15 05:31:45.280: E/AndroidRuntime(1692): at android.os.Looper.loop(Looper.java:136)
03-15 05:31:45.280: E/AndroidRuntime(1692): at android.app.ActivityThread.main(ActivityThread.java:5001)
03-15 05:31:45.280: E/AndroidRuntime(1692): at java.lang.reflect.Method.invokeNative(Native Method)
03-15 05:31:45.280: E/AndroidRuntime(1692): at java.lang.reflect.Method.invoke(Method.java:515)
03-15 05:31:45.280: E/AndroidRuntime(1692): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
03-15 05:31:45.280: E/AndroidRuntime(1692): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
03-15 05:31:45.280: E/AndroidRuntime(1692): at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException
at com.example.uiwidgettest.MainActivity.onClick(MainActivity.java:48)
48行包空指針