問題現象:
建立一個andriod項目,然後run as,出現如下介面:
[2014-02-13 16:36:54 - 手電筒] ------------------------------
[2014-02-13 16:36:54 - 手電筒] Android Launch!
[2014-02-13 16:36:54 - 手電筒] The connection to adb is down, and a severe error has occured.
[2014-02-13 16:36:54 - 手電筒] You must restart adb and Eclipse.
[2014-02-13 16:36:54 - 手電筒] Please ensure that adb is correctly located at 'D:\adt-bundle-windows-x86-20131030\sdk\platform-tools\adb.exe' and can be executed.
於是百度:
參考:
http://hi.baidu.com/yore2003/item/a7d9e5c125266e0bc710b2a3和http://www.cnblogs.com/longqi293/archive/2012/06/19/2554801.html 最終解決問題:
通常做法是---->cmd
cd到D:\adt-bundle-windows-x86-20131030\sdk\platform-tools這個目錄下
adb kill-server: 出現
然後在adb start-server
顯然,adb server並沒有運行,則表名本該adb用的連接埠被佔用了,參考 http://blog.sina.com.cn/s/blog_9d708b4f010155gp.html,瞭解到是5037連接埠被佔用,遂查看:
發現3756佔用了5037連接埠,繼續查看3756的task,如下:
表明是sjk_daemon.exe在使用,於是開啟工作管理員,找到進程
原來是金山毒霸裡的,應該是手機小幫手的程式,於是直接退出了金山,再運行就正常了。
另附:
http://blog.csdn.net/mad1989/article/details/9628495,這篇部落格也挺好。