appium无法定位连接的真机元素

报错信息:

com.android.ddmlib.SyncException:Remote object dosen't exist!

解决办法:

错误原因是因为没有dump下来界面的信息保存到uidump.xml文件中,而该文件保存在/data/local/tmp下,如果没生成该文件,uiautomatorviewer就会报这个错。

可以用命令

adb shell /system/bin/uiautomator dump /data/local/tmp/uidump.xml
原文地址:https://www.cnblogs.com/me1105/p/10918062.html