[英]Culebra in AndroidViewClient returns "RuntimeError: ERROR: Connecting to <socket… [Errno 111] Connection refused
Trying to use any culebra ( AndroidViewClient
) command returns following error: 尝试使用任何culebra( AndroidViewClient
)命令将返回以下错误:
$culebra -G $ 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 in 追溯(最近一次通话最近):文件“ / usr / local / bin / culebra”,第4行,位于import('pkg_resources')。run_script('androidviewclient == 13.5.0','culebra')文件“ / usr /lib/python2.7/dist-packages/pkg_resources/init.py“,行739,在run_script self.require(需要)[0] .run_script(script_name,ns)文件” /usr/lib/python2.7/ dist-packages / pkg_resources / init.py”,行1494,在run_script exec(代码,名称空间,名称空间)中,文件“ /usr/local/lib/python2.7/dist-packages/androidviewclient-13.5.0-py2.7 .egg / EGG-INFO / scripts / culebra”,行1168,在设备中,serialno = ViewClient.connectToDeviceOrExit(serialno = serialno,** kwargs1)文件“ /usr/local/lib/python2.7/dist-packages/androidviewclient -13.5.0-py2.7.egg / com / dtmilano / android / viewclient.py“,第2697行,在connectToDeviceOrExit设备= adbclient.AdbClient(serialno,ignoreversioncheck = ignoreversioncheck,timeout = timeout)文件” / usr / local / lib / python2.7 / dist-packages / androidviewclient-13.5.0-py2.7.egg / com / dtmilano / android / adb / adbclient.py“,第179行,在 it 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. 它self.socket = AdbClient.connect(self.hostname,self.port,self.timeout)文件“ /usr/local/lib/python2.7/dist-packages/androidviewclient-13.5.0-py2.7.egg/ com / dtmilano / android / adb / adbclient.py“,第252行,在connect上升RuntimeError(”错误:正在连接到%s:%d:%s。\\ nadb是否在您的计算机上运行?“%(s,端口,例如))RuntimeError:错误:连接至:5037:[Errno 111]连接被拒绝。 Is adb running on your computer? 您的计算机上是否正在运行adb?
Adb is debinitely running; 亚行正在运行; " adb devices
" lists connected device; “ adb devices
”列出了已连接的设备; " adb push
", " adb pull
"," adb shell
", all work fine. “ adb push
”,“ adb pull
”,“ adb shell
”,一切正常。
Opening firewall, setting path, reinstalling AndroidViewClient, updating software make no difference. 打开防火墙,设置路径,重新安装AndroidViewClient,更新软件没有什么区别。
A previous post "[androidviewclient - Can't connect to the device on vm with port forwarding][1]" concerns very similar error. 先前的文章“ [androidviewclient-无法通过端口转发连接到vm上的设备] [1]”涉及非常相似的错误。
His solution (below) does not work for me: 他的解决方案(如下)对我不起作用:
Blockquote 块引用
Solved - I changed localhost back to 127.0.0.1 in hosts file and it solves an issue... 已解决-我在hosts文件中将localhost更改回127.0.0.1,这解决了一个问题...
Blockquote 块引用
Any ideas? 有任何想法吗?
androidviewclient - Can't connect to the device on vm with port forwarding androidviewclient-无法通过端口转发连接到vm上的设备
Setting default from JDK 1.7 to JDK 1.8 solved this problem. 将默认值从JDK 1.7设置为JDK 1.8可以解决此问题。 Still getting an error message ("...there are no connected devices"), however since adb devices lists the phone, shouldn't be hard to figure out. 仍然收到错误消息(“ ...没有连接的设备”),但是由于adb设备列出了电话,因此应该不难发现。
Marking this question solved 标记此问题已解决
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.