【Mac+Android+uiautomatorviewer】之报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException
安卓8.0以后uiautomatorviewer会报错,解决办法如下:
参考:《android 8.0 以后 uiautomator 无法直接使用的问题》
步骤一:
先执行命令:(注意:想要定位一个页面,每次都要执行如下命令)
adb shell uiautomator dump /sdcard/screen.uix
adb pull /sdcard/screen.uix /Users/zhangc/Desktop/拾起卖相关资料/测试文档/C2BApp/Android/图片 注明:新手机地址改成:/data/local/tmp/**.uix
本地电脑会生成一个文件:一定要每次都得生成一次

再执行命令,截图:
cd /本地截图路径
adb shell screencap -p /sdcard/新文件夹/test.png
adb pull /sdcard/新文件夹/test.png
步骤二:


【Mac+Android+uiautomatorviewer】之报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException的更多相关文章
- 【Uiautomatorviewer】报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationT...
android 9.0系统不能用uiautomator识别 解决方法:android 8.0 以后 uiautomator 无法直接使用的问题https://www.cnblogs.com/copyw ...
- UIautomatorviewer连接设备报错Unexpected error while obtaining UI hierarchy
先来看下现象哈,点击sdk/tools下uiautomatorviever.bat,点击连接设备的图标,本以为就这么简单,那你就错了: 是不是看到这个瞬间心情就不好了,那么我们该怎么解决这个问题呢,归 ...
- 使用Axis2 插件 报错"An error occurred while completing process -java.lang.reflect.InvocationTargetException"
参考 http://blog.csdn.net/sunitjy/article/details/6793654
- android-tools下的uiautomatorviewer截图,提示“Unexpected error while obtaining UI hierarchy”
使用原来工具下的uiautomatorviewer对android 5.1.0的手机,进行截图,是正常的,切换到android10截图,就报错"Unexpected error while ...
- mavne install 报错org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException
maven install 报错 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.Invoc ...
- Android8 以上使用 UIautomator Viewer提示Unexpected error while obtaining UI hierarchy报错(方法二)
一:最常见的一个问题就是:Android8及以上的系统无法获取到页面,提示报下面的错误 二:解决办法 1.下载新的tools,在下面链接里找到SDK tools下载 http://www.androi ...
- uiautomator:Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
尝试用android sdk的uiautomatorviewer抓元素的时候报错:Error while obtaining UI hierarchy XML file: com.android.dd ...
- error while obtaining ui hierarchy xml file...用 uiautomatorviewer 获取安卓手机软件页面时报错
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't ...
- uiautomatorviewer 报错 Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
在进行自动化时经常需要使用到 uiautomatorviewer获取控件的各个属性,然后在脚本中通过各个控件的属性来操作. 如果使用的是uiautomator2的话,一般都是使用weditor这个来查 ...
随机推荐
- codeforces #578(Div.2)
codeforces #578(Div.2) A. Hotelier Amugae has a hotel consisting of 1010 rooms. The rooms are number ...
- python高级编程——网络编程(三)
TCP和并发服务器 与UDP不同的是,他是一个面向连接的,可靠的数据传输协议 TCP通信比较复杂 先写一个TCP服务器,一般步骤如下: 1.首先是要创建一个socket套接字:socket() 2.服 ...
- Java 之 Set 源码分析
一.HashSet 构造方法: HashSet() :构造一个新的空 set,其底层 HashMap 实例的默认初始容量是 16,加载因子是 0.75 源码: 二.LinkedHashSet 构造方 ...
- Python3的map/reduce
Python内建了map()和reduce()函数. 原文在这里MapReduce: Simplified Data Processing on Large Clusters,map/reduce的概 ...
- LINUX中ORACLE 11.2.0.1 升级到11.2.0.4
11.2.0.4补丁号13390677,共7个文件,分别是 其中1&2是db,3是grid,4是client,5是gateways,6是example,7是deinstall 上传安装介质并解 ...
- 记录一个h5页面生成canvas画布做签名的js插件--signature_pad
demo地址:https://jsfiddle.net/02dLn15g/5/ GitHub地址:https://github.com/szimek/signature_pad 配置项: dotSiz ...
- Angular----样式
本篇根据Angular官网提供的例子,对Angular涉及到的样式绑定进行说明. 一.提供的CSS样式 .red{ color:red; } .green{ color: green; } .yell ...
- 06. redis cluster
目录 Redis Cluster redis cluster 特点 搭建redis cluster 访问redis cluster redis-cli 访问redis cluster 重新分片数据 新 ...
- (原)堆叠hourglass网络
转载请注明出处: https://www.cnblogs.com/darkknightzh/p/11486185.html 论文: https://arxiv.org/abs/1603.06937 官 ...
- 安装centos6.10时,安装完成重启报错error 15,file not found
今天在一台老式联想服务器上安装centos6.10操作系统,安装完成,重启时,出现报错 error 15, file not found...... 在百度上搜索到进grub编辑,可还是无法解决问题, ...