Error obtaining UI hierarchy Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist

∥☆過路亽.° 提交于 2019-11-28 10:05:17

The best way is to kill the adb server and start it again.

  • sudo adb kill-server
  • sudo adb start-server

This will do the trick.

Currently your UI needs to be idle (as in no Accessibility Events sent) for at least 1000ms before the AccessibilityService will be able to produce the UI hierarchy dump.

If you would try to run adb shell uiautomator dump it would give you the ERROR: could not get idle state.

Even though it's late I'm giving my observation here. Even I got this issue. Before taking the screen shot from UI Automator terminate the appium server connection. Then try to capture screenshot. It works fine.

Try Restarting your device, which worked in my case.

Close other AccessibilityService in your phone please.

in the device or emulator, display the applications opened , and close them all. monitor should refresh itself immediately, and get the hierarchies, as if one of the apps opened was making trouble.

Before taking the screen shot from "uiautomatorviewer" please terminate the appium server connection by using ctrl+C command. Then try to capture screenshot. It works fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!