我是靠谱客的博主 还单身寒风,这篇文章主要介绍Uiautomatorviewer报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationT...,现在分享给大家,希望可以做个参考。

一、报错截图

android8以后sdk自带的uiautomator直接打开,截取不到机器界面信息。

建议可以使用以下方法手动截取

 

 

 

 

 

 

二、解决方法

1.截取uix文件

adb shell uiautomator dump /sdcard/sc.uix

adb pull /sdcard/sc.uix

注明:新手机地址改成:/data/local/tmp/**.uix

2.截取截图

adb shell screencap -p /sdcard/sc.png

adb pull /sdcard/sc.png 

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

 

三、解决后截图

最后

以上就是还单身寒风最近收集整理的关于Uiautomatorviewer报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationT...的全部内容,更多相关Uiautomatorviewer报错:Unexpected内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(59)

评论列表共有 0 条评论

立即
投稿
返回
顶部