为什么MonkeyRunner.waitForConnection()错误"亚洲开发银行ADB拒绝端口转发命令:无法绑定套接字" [英] Why does MonkeyRunner.waitForConnection() error "Adb rejected adb port forwarding command: cannot bind socket"
问题描述
当我试图让与MonkeyRunner的设备我得到这个消息:
newdevice = MonkeyRunner.waitForConnection()
110804 17:35:28.561:S [主] [com.android.monkeyrunner.adb.AdbMonkeyDevice]亚洲开发银行ADB拒绝端口转发命令:无法绑定套接字
110804 17:35:28.561:S [主] [com.android.monkeyrunner.adb.AdbMonkeyDevice] com.android.ddmlib.AdbCommandRejectedException:无法绑定套接字
块引用>
块引用>
块引用>我正在从Windows XP中的命令行使用JDK 1.6.0_26,Python的2.7.2和Android SDK monkeyrunner.bat 11 ADB设备显示了我的USB设备。
解决方案我也曾经碰到过这个问题,但杀死并重新启动服务器ADB解决din't问题。
我曾与下面的程序解决它。
- 开启命令提示符以下命令来运行
听
netstat的-ano
它列出了所有PID和端口号。
记下PID端口12345- 转到任务管理器 - >进程选项卡
从查看 - >选择Coloumns勾选PID字段。
具有PID在previous一步指出现在终止进程。现在的MonkeyRunner进行进一步。
注意:
12345端口从AdbChimpDevice.java在chimpchat.jar识别
位于.. \\ Android的SDK-WINDOWS \\工具\\ lib目录\\ chimpchat.jar
When I try to get a device with MonkeyRunner I get this message:
newdevice = MonkeyRunner.waitForConnection() 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
- 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
- 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
这篇关于为什么MonkeyRunner.waitForConnection()错误"亚洲开发银行ADB拒绝端口转发命令:无法绑定套接字"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!