xiaoliuzi_0_0
xiaoliuzi_0_0
2016-03-15 08:45
采纳率: 83.3%
浏览 3.1k
已采纳

安卓虚拟机总是出现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)
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • lxk_1993
    103style 2016-03-15 10:42
    已采纳

    java.lang.NullPointerException
    at com.example.uiwidgettest.MainActivity.onClick(MainActivity.java:48)

    48行包空指针
    
    点赞 评论
  • u011249920
    简一_hz 2016-03-15 08:48

    看一下Logcat输出的信息,会有提示的

    点赞 评论
  • luochoudan
    丑旦 2016-03-15 08:53

    贴日志,直接定位崩溃的原因

    点赞 评论

相关推荐