Error obtaining UI hierarchy Error while obtaining

2019-01-19 03:01发布

I am testing my app with adb, but i get this error when i execute "dump view hierarchy for uiautomator":

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

My adb version is 1.0.36 and my android version is 6.0.1.

This error comes launched only when in the interface there is a dynamic element that is in motion.

thank you in advance.

5条回答
Fickle 薄情
2楼-- · 2019-01-19 03:38

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.

查看更多
聊天终结者
3楼-- · 2019-01-19 03:47

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.

查看更多
Evening l夕情丶
4楼-- · 2019-01-19 03:48

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.

查看更多
▲ chillily
5楼-- · 2019-01-19 03:48

Close other AccessibilityService in your phone please.

查看更多
Root(大扎)
6楼-- · 2019-01-19 03:50

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.

查看更多
登录 后发表回答