做手机自动化工测试,利用 uiautomator 编写自动化脚本,在 android6.0 的设备上运行时正常的,现在测试 android7.0 的设备,就会出现如下错误,请大神指教是什么问题?要怎么解决?

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
    raise err
[Decode error - output not utf-8]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
[Decode error - output not utf-8]
    server.start(timeout=30)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\uiautomator\__init__.py", line 481, in start
    raise IOError("RPC server not started!")
OSError: RPC server not started!
[Finished in 348.7s with exit code 1]


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