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

Ale7 picture Ale7 · Oct 24, 2016 · Viewed 43.7k times · Source

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.

Answer

Hitesh Grover picture Hitesh Grover · Nov 2, 2017

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.