uiautomator2 总是重启失败,卸载重装也无效,按照提示验证都正常,且按照提示更新也无效
报错信息如下:

INFO:apscheduler.executors.default:Running job "prepare_test (trigger: interval[0:01:00], next run at: 2018-11-21 23:00:24 CST)" (scheduled at 2018-11-21 23:00:24.105281+08:00)
/Library/Python/2.7/site-packages/uiautomator2/__init__.py:470: RuntimeWarning: uiautomator2 is not reponding, restart uiautomator2 automatically
  stacklevel=1)
[2018-11-21 23:00:24] uiautomator is starting ...
[2018-11-21 23:00:25] uiautomator is starting ...
[2018-11-21 23:00:26] uiautomator is starting ...
[2018-11-21 23:00:27] uiautomator is starting ...
[2018-11-21 23:00:29] uiautomator is starting ...
[2018-11-21 23:00:30] uiautomator is starting ...
[2018-11-21 23:00:31] uiautomator is starting ...
[2018-11-21 23:00:32] uiautomator is starting ...
[2018-11-21 23:00:33] uiautomator is starting ...
[2018-11-21 23:00:34] uiautomator is starting ...
[2018-11-21 23:00:35] uiautomator is starting ...
[2018-11-21 23:00:36] uiautomator is starting ...
[2018-11-21 23:00:37] uiautomator is starting ...
[2018-11-21 23:00:38] uiautomator is starting ...
[2018-11-21 23:00:39] uiautomator is starting ...
[2018-11-21 23:00:40] uiautomator is starting ...
[2018-11-21 23:00:41] uiautomator is starting ...
[2018-11-21 23:00:43] uiautomator is starting ...
[2018-11-21 23:00:44] uiautomator is starting ...
ERROR:apscheduler.executors.default:Job "prepare_test (trigger: interval[0:01:00], next run at: 2018-11-21 23:01:24 CST)" raised an exception
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/Users/lizhen/cmcm/android_perfmance/battery/bugreport_python/battery_scene/u2_bugreport_test.py", line 118, in prepare_test
    screen_unlock()
  File "/Users/lizhen/cmcm/android_perfmance/battery/bugreport_python/battery_scene/u2_bugreport_test.py", line 34, in screen_unlock
    sess.screen_on()
  File "/Library/Python/2.7/site-packages/uiautomator2/__init__.py", line 1573, in screen_on
    self.jsonrpc.wakeUp()
  File "/Library/Python/2.7/site-packages/uiautomator2/__init__.py", line 458, in __call__
    params, http_timeout)
  File "/Library/Python/2.7/site-packages/uiautomator2/__init__.py", line 472, in jsonrpc_retry_call
    self.reset_uiautomator()
  File "/Library/Python/2.7/site-packages/uiautomator2/__init__.py", line 653, in reset_uiautomator
    "Uiautomator started failed. Find solutions in https://github.com/openatx/uiautomator2/wiki/Common-issues"
RuntimeError: Uiautomator started failed. Find solutions in https://github.com/openatx/uiautomator2/wiki/Common-issues


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