问题描述
我可以成功启动 Uiautomatorviewer,检查个人资料中的任何页面/应用。
在工作资料中拨打电话/启动安装在工作资料下的任何应用程序后,Uiautomatorviewer 会抛出错误:
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
我不知道为什么它会突然出现这种情况,上周无论个人/工作资料如何,它都可以正常工作。 我不记得我更改了任何配置...
请帮忙给我线索为什么?我遵循了许多以前的帖子建议重新启动 adb 服务器,杀死 appium 服务器,重新启动手机/笔记本电脑,禁用启用开发人员选项......等。没有任何作用....
我现在尝试检查个人资料,发生了同样的错误:
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
更新:我使用了 appium studio 检查器,它可以工作。我仍然不确定通过命令行对 adb 或 uiautomator 发生了什么?我该如何调试?
解决方法
找到答案
com.android.ddmlib.SyncException: Is a directory
try doing adb shell rm -rf /data/local/tmp and rebooting the phone first. it's ok if you get rm: /data/local/tmp: Permission denied. ignore it - it's for the tmp folder itself after its content was already removed (that's what you need anyway)