【Android】【问题解决记录】Error obtaining UI hierarchy

  

  在使用uiautomatorviewer时遇到两类Error obtaining UI hierarchy报错,分别是:

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

Error taking device screenshot: EOF

解决方法

尝试过很多网上查找的方法,有说是Appium影响的,最后还一言不合把Appium也卸载了,但是还是无果。其实问题根源很简单。是电脑端的adb版本过高导致 ┓( ´∀` )┏

执行adb shell getprop ro.build.version.sdk,查看手机sdk版本为28,而电脑安装的platform-tools是29,看来adb版本过高也不可以。最后重新下载个28版本即可搞定(๑•̀ㅂ•́)و✧

猜你喜欢

转载自www.cnblogs.com/lilip/p/11089713.html