Android開發abd相關異常:Adb connection Error:遠程主機強迫關閉了一個現有的連接
本文主要解決 adbconnectionerror的問題——resetadb.
環境為真機測試,偶爾會報如下錯誤

[ 2012 - 04 - 24 20 : 41 : 34 -DeviceMonitor]AdbconnectionError:遠程主機強迫關閉了一個現有的連接。
[ 2012 - 04 - 24 20 : 41 : 36 -DeviceMonitor]Connectionattempts: 1
[ 2012 - 04 - 24 20 : 41 : 38 -DeviceMonitor]Connectionattempts: 2
[ 2012 - 04 - 24 20 : 41 : 40 -DeviceMonitor]Connectionattempts: 3
[ 2012 - 04 - 24 20 : 41 : 42 -DeviceMonitor]Connectionattempts: 4
[ 2012 - 04 - 24 20 : 41 : 44 -DeviceMonitor]Connectionattempts: 5
[ 2012 - 04 - 24 20 : 41 : 46 -DeviceMonitor]Connectionattempts: 6
[ 2012 - 04 - 24 20 : 41 : 48 -DeviceMonitor]Connectionattempts: 7
[ 2012 - 04 - 24 20 : 41 : 50 -DeviceMonitor]Connectionattempts: 8
[ 2012 - 04 - 24 20 : 41 : 52 -DeviceMonitor]Connectionattempts: 9
[ 2012 - 04 - 24 20 : 41 : 54 -DeviceMonitor]Connectionattempts: 10
[ 2012 - 04 - 24 20 : 41 : 56 -DeviceMonitor]Connectionattempts: 11
[ 2012 - 04 - 24 20 : 44 : 06 -ddms]ADBrejectedshellcommand(ls-l/):closed
[ 2012 - 04 - 24 20 : 44 : 11 -ddms]ADBrejectedshellcommand(ls-l/):closed
之前都是重啟eclipse解決,但偶爾還解決不了。對于真機需要 拔掉數據線,關閉eclipse重啟,重新連接手機 解決。
但由于eclipse實在過于笨重,關閉重啟時間過長。找到另外一種解決方法:
eclipse中視圖模式 選擇DDMS (還有常見的java和debug視圖),顯示Devices窗口,若無可通過選擇window->showview->Devices顯示,再 選擇下拉箭頭中的resetadb 。
此時eclipse會再自動重試一次,輸入Connectionattempts:1即表示成功啦
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
