程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程解疑 >> ui- 安卓虛擬機總是出現Unfortunately,xxxxxxxx has stopped

ui- 安卓虛擬機總是出現Unfortunately,xxxxxxxx has stopped

編輯:編程解疑
安卓虛擬機總是出現Unfortunately,xxxxxxxx has stopped

是按照《第一行代碼》寫的,改成跟書上一模一樣還出現這個,求指導

 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行包空指針
lxk_1993
lxk_1993
xiaoliuzi_0_0
xiaoliuzi_0_0
xiaoliuzi_0_0
lxk_1993
xiaoliuzi_0_0
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved