Culebra in AndroidViewClient returns "RuntimeError: ERROR: Connecting to <socket... [Errno 111] Connection refused

Culebra in AndroidViewClient returns "RuntimeError: ERROR: Connecting to <socket... [Errno 111] Connection refused

尝试使用任何 culebra (AndroidViewClient) 命令 returns 以下错误:

$culebra -G

Traceback (most recent call last): File "/usr/local/bin/culebra", line 4, in import('pkg_resources').run_script('androidviewclient==13.5.0', 'culebra') File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 739, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1494, in run_script exec(code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/androidviewclient-13.5.0-py2.7.egg/EGG-INFO/scripts/culebra", line 1168, in device, serialno = ViewClient.connectToDeviceOrExit(serialno=serialno, **kwargs1) File "/usr/local/lib/python2.7/dist-packages/androidviewclient-13.5.0-py2.7.egg/com/dtmilano/android/viewclient.py", line 2697, in connectToDeviceOrExit device = adbclient.AdbClient(serialno, ignoreversioncheck=ignoreversioncheck, timeout=timeout) File "/usr/local/lib/python2.7/dist-packages/androidviewclient-13.5.0-py2.7.egg/com/dtmilano/android/adb/adbclient.py", line 179, in init self.socket = AdbClient.connect(self.hostname, self.port, self.timeout) File "/usr/local/lib/python2.7/dist-packages/androidviewclient-13.5.0-py2.7.egg/com/dtmilano/android/adb/adbclient.py", line 252, in connect raise RuntimeError("ERROR: Connecting to %s:%d: %s.\nIs adb running on your computer?" % (s, port, ex)) RuntimeError: ERROR: Connecting to :5037: [Errno 111] Connection refused. Is adb running on your computer?

Adb 肯定是 运行; "adb devices" 列出连接的设备; “adb push”、“adb pull”、“adb shell”,一切正常。

打开防火墙,设置路径,重装AndroidViewClient,更新软件都没有影响。

之前的post“[androidviewclient - 无法使用端口转发连接到 vm 上的设备][1]”涉及非常相似的错误。

他的解决方案(如下)对我不起作用:

Blockquote

已解决 - 我在主机文件中将 localhost 改回 127.0.0.1,它解决了一个问题...

Blockquote

有什么想法吗?

androidviewclient - Can't connect to the device on vm with port forwarding

将默认值从 JDK 1.7 设置为 JDK 1.8 解决了这个问题。 仍然收到错误消息(“...没有连接的设备”),但是由于 adb devices 列出了 phone,应该不难弄清楚。

标记此问题已解决