开发者

Why does MonkeyRunner.waitForConnection() error "Adb rejected adb port forwarding command: cannot bind socket"

When I try to get a device with MonkeyRunner I get this message:

newdevice = MonkeyRunner.waitF开发者_C百科orConnection() 110804 17:35:28.561:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice] Adb rejected adb port forwarding command: cannot bind socket 110804 17:35:28.561:S [main] [com.android.monkeyrunner.adb.AdbMonkeyDevice]com.android.ddmlib.AdbCommandRejectedException: cannot bind socket

I'm running monkeyrunner.bat from the commandline in windows Xp with JDK 1.6.0_26, Python 2.7.2, and Android SDK 11. adb devices shows my USB device.


I also had come across this problem but killing and restarting the adb server din't solve the issue. I have solved it with below procedure

  1. open command prompt and run below command netstat -ano This lists all PID and port numbers. Make a note of PID listening on port 12345
  2. Go to task manager->Processes tab and from View->Select Coloumns Tick the PID field. Now kill the process with PID noted in previous step.

Now the MonkeyRunner proceeds further.

Note:

12345 port is identified from AdbChimpDevice.java in chimpchat.jar located in

..\android-sdk-windows\tools\lib\chimpchat.jar

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜