Uiautomatorviewer报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException


参考文章

https://blog.csdn.net/qq_38776582/article/details/105364683

https://blog.csdn.net/dengachao/article/details/100535536

费了很长时间一直解决不了ui automator viewer 分析控件的问题,原因说是ANDROID 8以上SDK的兼容性问题,最后还是按照上面这些参考文章提到的手动截图的方法处理的.

步骤:

1.截取uix文件

adb shell uiautomator dump /sdcard/sc.uix

adb pull /sdcard/sc.uix

2.截图

adb shell screencap -p /sdcard/sc.png

adb pull /sdcard/sc.png 

3.打开sdk tools目录下的uiautomatorviewer.bat,导入从机器获取的截图和资源文件

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM