ATX version 1.1.3 dev35
ADB version 1.0.36
System MAC
一到使用 uiautomator 的时候就报此错误
复现 100%

Log:

d(className='android.widget.Button', text = '允许').click()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/uiautomator/init.py", line 897, in inner
self.wait_for_exists(self.timeout) # default
File "/usr/local/lib/python2.7/site-packages/uiautomator/
init.py", line 933, in wait_for_exists
return self.jsonrpc.waitForExists(self.selector, timeout)
File "/usr/local/lib/python2.7/site-packages/uiautomator/
init.py", line 417, in wrapper
return _method_obj(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/uiautomator/
init.py", line 196, in __call_
return self.remote_call(data)
File "/usr/local/lib/python2.7/site-packages/uiautomator/init.py", line 183, in remote_call
"%s: %s" % (exception_type, error["message"])
uiautomator.JsonRPCError: JsonRPC Error code: -32001, Message: java.lang.IllegalStateException: UiAutomation not connected!


↙↙↙阅读原文可查看相关链接,并与作者交流