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

问题

启动Android SDK里的uiautomatorviewer.bat,点击Device Screenshort按钮

Device Screenshort

异常出现:

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

无图,问题出现时忘记截图了。

解决方法:

方法① 在cmd命令窗口中输入 adb root (appium已运行)。

功能图示:

Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!_第1张图片
adb root 功能

方法② 如果你开了appium,请关闭即可。

思考

我初步怀疑可能由于我的adb在真机里没用root权限(真机是我自己装的系统)。

你可能感兴趣的:(Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!)