我在android 开发揭秘的书中 弄过来的源代码  一运行  到模拟器时  就说你运行的程序意外停止  怎么解决啊 

解决方案 »

  1.   

    看 logcat 里面的信息。
      

  2.   

    [2012-03-24 13:55:45 - ww] Failed to install ww.apk on device 'emulator-5554': Connection refused: connect
    [2012-03-24 13:55:45 - ww] java.net.ConnectException: Connection refused: connect
    [2012-03-24 13:55:45 - ww] Launch canceled!
    [2012-03-24 13:55:46 - ww] Uploading ww.apk onto device 'emulator-5554'
    [2012-03-24 13:55:46 - ww] Failed to install ww.apk on device 'emulator-5554': Connection refused: connect
    [2012-03-24 13:55:46 - ww] java.net.ConnectException: Connection refused: connect
    [2012-03-24 13:55:46 - ww] Launch canceled!
    [2012-03-24 13:55:47 - ww] Failed to install ww.apk on device 'emulator-5554': Connection refused: connect
    [2012-03-24 13:55:47 - ww] java.net.ConnectException: Connection refused: connect
    [2012-03-24 13:55:47 - ww] Launch canceled!
    [2012-03-24 13:55:45 - ww]没有安装第一次世界大战。丹共装置的模拟器- 5554年:连接拒绝:连接
    [2012-03-24 13:55:45 - ww]java.net.ConnectException:连接拒绝:连接
    [2012-03-24 13:55:45 - ww]发射了!
    [2012-03-24 13:55:46 - ww]上传第一次世界大战。丹共到装置'模拟器- 5554 '
    [2012-03-24 13:55:46 - ww]没有安装第一次世界大战。丹共装置的模拟器- 5554年:连接拒绝:连接