{"id":455,"date":"2018-09-04T11:59:06","date_gmt":"2018-09-04T03:59:06","guid":{"rendered":"http:\/\/localhost\/?p=455"},"modified":"2018-09-04T11:59:06","modified_gmt":"2018-09-04T03:59:06","slug":"python-%e8%87%aa%e5%8a%a8%e5%8c%96uiautomator-%e6%8a%a5%e9%94%99%ef%bc%9aioerror-rpc-server-not-started%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.ahomer.cn\/?p=455","title":{"rendered":"python \u81ea\u52a8\u5316uiautomator \u62a5\u9519\uff1aioerror RPC server not started\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<p><strong>\u5728\u4f7f\u7528\u6700\u65b0\u7684VIVO X21\u624b\u673a\u8fc7\u7a0b\u4e2d\uff0c\u81ea\u52a8\u5316\u811a\u672c\u62a5\u9519\uff1a<\/strong><\/p>\n<p>Traceback (most recent call last):<br \/>\n  File \"main.py\", line 75, in <module><br \/>\n    Automated.test_auto_test()<br \/>\n  File \"main.py\", line 22, in test_auto_test<br \/>\n    QQLive = Record_QQLive(serial='2973cab8')<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/Record_QQLive.py\", line 25, in <strong>init<\/strong><br \/>\n    self.test_initEnv()<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/Record_QQLive.py\", line 93, in test_initEnv<br \/>\n    self.dins.pressHome()<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/androidDrive\/deviceInstance.py\", line 85, in pressHome<br \/>\n    self.ins.pressHome()<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/androidDrive\/deviceInstance.py\", line 239, in pressHome<br \/>\n    self._sys.pressHome()<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/androidDrive\/sysActions.py\", line 49, in pressHome<br \/>\n    self._d.press(\"home\")<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/androidDrive\/helper.py\", line 140, in <strong>call<\/strong><br \/>\n    return self.func(*args, **kwargs)<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/androidDrive\/automatorDevice.py\", line 233, in _press<br \/>\n    return self.server.jsonrpc.pressKey(str(key))<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/androidDrive\/automatorServer.py\", line 81, in wrapper<br \/>\n    server.start(timeout=30)<br \/>\n  File \"\/mnt\/f\/AutoStartTime\/androidDrive\/automatorServer.py\", line 122, in start<br \/>\n**raise IOError(\"RPC server not started!\")<br \/>\nIOError: RPC server not started!<br \/>\n**<\/p>\n<p>\u51fa\u9519\u539f\u56e0\uff1a<br \/>\n    7.0\u7684\u624b\u673a\u4e0d\u4f1a\u81ea\u52a8\u5b89\u88c5app-uiautomator.apk\u548capp-uiautomator-test.apk\uff0c\u624b\u52a8\u88c5\u4e00\u4e0b\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p><strong>\u89e3\u51b3\u529e\u6cd5\u5982\u4e0b\uff1a<br \/>\n1. adb shell pm uninstall com.github.uiautomator<br \/>\n2. adb shell pm uninstall com.github.uiautomator.test<br \/>\n3. adb install app-uiautomator.apk<br \/>\n4. adb install app-uiautomator-test.apk<br \/>\n5. adb push bundle.jar \/data\/local\/tmp\/<br \/>\n6. adb push uiautomator-stub.jar \/data\/local\/tmp\/<\/strong><\/p>\n<p>\u76f8\u5173\u6587\u4ef6\u4e0b\u8f7d\u5730\u5740\uff1a<br \/>\nhttps:\/\/github.com\/jiankehtt\/uiautomator\/tree\/master\/uiautomator\/libs<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u4f7f\u7528\u6700\u65b0\u7684VIVO X21\u624b\u673a\u8fc7\u7a0b\u4e2d\uff0c\u81ea\u52a8\u5316\u811a\u672c\u62a5\u9519\uff1a Traceback (most recent cal [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[13,15,14,16],"class_list":["post-455","post","type-post","status-publish","format-standard","hentry","category-program","tag-anddoid","tag-wsl","tag-14","tag-16"],"_links":{"self":[{"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/posts\/455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=455"}],"version-history":[{"count":1,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":456,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/posts\/455\/revisions\/456"}],"wp:attachment":[{"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}