Ui Automator Viewer 使用报错问题 提示’Error obtaining UI hierarchy‘

大神方案:

  在C:sdkandroid-sdk-windows ools路径下的uiautomatorviewer.bat,右键编辑打开,在最末端输入:

call adb shell uiautomator dumpcall 
call adb pull /storage/sdcard/window_dump.xml .
call window_dump.xml


通用方案:
桌面新建 test.bat文件,添加五行代码,内容如下:
 # 此处输入任意自己本地路径
uiautomatorviewer 中导入。
聊胜于无,虽然麻烦,但能解决问题,毕竟页面就那几个
感谢大神分享~
来源:https://www.jianshu.com/p/200de8ded032


原文地址:https://www.cnblogs.com/zzxzxj/p/13426294.html