Error obtaining UI hierarchy Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn’t exist!
在使用UIAutomatorViewer获取UI也碰到了Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn’t exist!这个问题。当时首页有幻灯片一直在滚动,后面找到了解决方案
https://stackoverflow.com/questions/25201743/error-in-using-uiautomatorviewer-for-testing-android-app-in-appium
adb shell
su root
chmod 777 /data/local/tmp
再次使用UIAutomatorViewer获取则成功获取界面元素