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

用 uiautomatorviewer 获取安卓手机软件页面时报错:

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

 

 

解决方法:

拔出usb数据线,重新连接手机;重新启动即可