安卓 ADB常見問題整理

如下都是ADB鏈接問題,能夠經過嘗試以下步驟,由簡單度排序
1. 插拔下USB鏈接線
2. 關閉USB模式再打開
3. 執行如下命令
adb kill-server
adb start-server  
 
4.  效果與3相同
DDMS - Devices - Reset adb
 
5. 關閉全部PC套件,例如:
殺死 Wandoujia  相關的全部進程,ok
wandoujia_daemon.exe
wandoujia_helper.exe
 
6. 重啓Eclipse
7. 查看有幾個ADB進程,所有殺死再從新啓動ADB
8. 查看下USB先是否鏈接電腦與手機
9. 重啓手機
10. 關閉佔用5037端口軟件
11. 更新adb (見問題14)
 
1. 查看佔用端口5037的PID值
netstat -a -n -o |findstr "5037"
輸出結果:
  TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       5096
  TCP    127.0.0.1:5037         127.0.0.1:51577        ESTABLISHED     5096
  TCP    127.0.0.1:51577        127.0.0.1:5037         ESTABLISHED     4324


2. 從上面得知PID = 5096佔用了5037端口,如今經過PID查看進程名,看到底哪一個進程佔用此端口
tasklist /v | findstr 5096
輸出結果:
tadb.exe  5096 Console  1  4,932 K Unknown  ......  0:00:02 暫缺


網上查詢得知tadb.exe是騰訊管家啓動的進程


3. 殺死佔用5037端口的進程 tadb.exe
taskkill /f -pid 5096
taskkill /im tadb.exe
輸出結果
成功: 已終止 PID 爲 5096 的進程。
 
 

問題1 
The connection to adb is down, and a severe error has occured.
You must restart adb and Eclipse.
Please ensure that adb is correctly located at 'adb.exe' and can be executed.

 
問題2
ADB server didn't ACK
* failed to start daemon *
 
 
問題3
Adb failed to restart! Make sure the plugin is properly configured


 
問題4
** Adb connection Error:遠程主機強迫關閉了一個現有的鏈接
 
 
問題5
java.io.IOException: 您的主機中的軟件停止了一個已創建的鏈接。
      at sun.nio.ch.SocketDispatcher.write0(Native Method)
      at sun.nio.ch.SocketDispatcher.write(Unknown Source)
      at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
      at sun.nio.ch.IOUtil.write(Unknown Source)
      at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
      at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
      at com.android.ddmlib.Client.sendAndConsume(Client.java:575)
      at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
      at com.android.ddmlib.Client.requestAllocationStatus(Client.java:421)
      at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:854)
      at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:822)
      at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:781)
      at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:649)
      at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:42)
      at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:577)


一般是同時打開了兩個eclipse,關閉一個便可
 
問題6
Failed to install .apk on device '': Unable to open sync connection!
java.io.IOException: Unable to open sync connection!
Launch canceled!
 
問題7
ADB rejected shell command (rm /data/local/.apk): closed
Error during Sync: Unable to open sync connection!
Error during Sync: Unable to open sync connection!
Adb connection Error:遠程主機強迫關閉了一個現有的鏈接。
Connection attempts: 1
Connection attempts: 2
Connection attempts: 3
 
 
問題8
Failed to install .apk on device  : Too many open files
com.android.ddmlib.SyncException: Too many open files
Launch failed on device: 
 
 
問題9
Failed to install .apk on device '': closed
com.android.ddmlib.InstallException: closed
Launch failed on device:


問題10
Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
Please check logcat output for more details.
Launch failed on device:
 
問題11
Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE
Please check logcat output for more details.
Launch failed on device: 

使用PC套件刪除,而後安裝不行,經過adb uninstall 再次刪除,安裝ok
 
問題12
Android Launch!
Connection with adb was interrupted.
0 attempts have been made to reconnect.
You may want to manually restart adb from the Devices view.


問題13
 Unexpected error while launching logcat. Try reselecting the device.] closed
com.android.ddmlib.AdbCommandRejectedException: closed
      at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:381)
      at com.android.ddmlib.Device.executeShellCommand(Device.java:462)
      at com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:109)
      at java.lang.Thread.run(Unknown Source)


問題14
adb server is out of date.  killing...
* daemon started successfully *
error: device offline
 
出現問題的版本
D:\>adb version
Android Debug Bridge version 1.0.29 
 
問題出在adb的版本過低,更新ADT後問題解決
D:\>adb version
Android Debug Bridge version 1.0.31
相關文章
相關標籤/搜索