Uiautomatorviewer连接手机报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.Invocation。。
·
在做monkey的测试中,Uiautomatorviewer连接手机报“Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException”

解决方法如下:
1.截取uix文件和拉取uix文件到本地
adb shell uiautomator dump /sdcard/test.uix
##截取uix
d:
adb pull /sdcard/test.uix
##拉取uix文件到d盘根目录
2…截取截图并拉取图片到本地
adb shell screencap -p /sdcard/test.png
##截取截图
d:
adb pull /sdcard/test.png
##拉取截图到d盘根目录
3.打开sdk tools目录下的uiautomatorviewer.bat,导入拉取的文件

更多推荐
所有评论(0)