欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 财经 > 金融 > UI Automator Viewer操作

UI Automator Viewer操作

2026/5/24 14:24:05 来源:https://blog.csdn.net/qq_43742383/article/details/144608365  浏览:    关键词:UI Automator Viewer操作

版本:24.4.1

使用UI Automator Viewer报错如下:

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

可以使用指令:

  1. 保存uix文件
adb shell uiautomator dump /sdcard/sc.uix
  1. pull到PC端
adb pull /sdcard/sc.uix C:\Users\xxx\Downloads\files\cs.uix
  1. 截图
adb shell screencap -p /sdcard/yuyue.png
  1. pull到PC端
 adb pull /sdcard/yuyue.png  C:\Users\changsheng_jiang\Downloads\files\yuyue.png
  1. 在tools\bin下打开终端,输入
uiautomatorviewer

UI
点击open,出现一个小的界面
dump
但是该界面不能拉伸,可以使用 Tab 键切换按钮,然后按Enter选中,分别上传刚才保存在PC的png(仅该后缀)以及uix文件,如下:
screenshot
注:需开启USB调试模式

常用指令

  • 重启服务
    adb kill-server
    adb start-server

  • 查看连接设备
    adb devices

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词