Trying to use any culebra (AndroidViewClient
) command returns following error:
$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 is debinitely running; "adb devices
" lists connected device; "adb push
", "adb pull
","adb shell
", all work fine.
Opening firewall, setting path, reinstalling AndroidViewClient, updating software make no difference.
A previous post "[androidviewclient - Can't connect to the device on vm with port forwarding][1]" concerns very similar error.
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...
Blockquote
Any ideas?
androidviewclient - Can't connect to the device on vm with port forwarding
Setting default from JDK 1.7 to JDK 1.8 solved this problem. Still getting an error message ("...there are no connected devices"), however since adb devices lists the phone, shouldn't be hard to figure out.
Marking this question solved