【问题标题】:Uiautomatorviewer Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist获取 UI 层次结构 XML 文件时出现 Uiautomatorviewer 错误:com.android.ddmlib.SyncException:远程对象不存在
【发布时间】:2021-04-11 23:25:21
【问题描述】:

我可以成功启动 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 通过命令行发生了什么?如何调试?

【问题讨论】:

  • 可能问题出在您从服务器接收的数据中,在这种情况下某些数据丢失。

标签: adb android-uiautomator


【解决方案1】:

找到答案

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)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-05-07
    • 2018-11-20
    • 1970-01-01
    • 1970-01-01
    • 2016-04-09
    • 1970-01-01
    • 1970-01-01
    • 2019-03-21
    相关资源
    最近更新 更多