UIautomatorviewer连接设备报错Unexpected error while obtaining UI hierarchy
先来看下现象哈,点击sdk/tools下uiautomatorviever.bat,点击连接设备的图标,本以为就这么简单,那你就错了:

是不是看到这个瞬间心情就不好了,那么我们该怎么解决这个问题呢,归根结底还是要把界面元素属性找出来呀。。
耐心往下看,吧啦吧啦。。奉上解决方案:
1.在电脑随便某个盘创建两个文本文件
xx.uix,xx.png

2.执行以下命令(-s 设备名称)
adb -s XEGNW18828001115 shell uiautomator dump /sdcard/app.uix
adb -s XEGNW18828001115 pull /sdcard/app.uix D:/app.uix

adb -s XEGNW18828001115 shell screencap -p /sdcard/app.png
adb -s XEGNW18828001115 pull /sdcard/app.png D:/app.png

3.导入从设备上获取的截图和资源文件

4.见证奇迹的时刻来了

做一棵小草,谁也撼动不了………
UIautomatorviewer连接设备报错Unexpected error while obtaining UI hierarchy的更多相关文章
- android-tools下的uiautomatorviewer截图,提示“Unexpected error while obtaining UI hierarchy”
使用原来工具下的uiautomatorviewer对android 5.1.0的手机,进行截图,是正常的,切换到android10截图,就报错"Unexpected error while ...
- 【Mac+Android+uiautomatorviewer】之报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException
安卓8.0以后uiautomatorviewer会报错,解决办法如下: 参考:<android 8.0 以后 uiautomator 无法直接使用的问题> 步骤一: 先执行命令:(注意:想 ...
- 【Uiautomatorviewer】报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationT...
android 9.0系统不能用uiautomator识别 解决方法:android 8.0 以后 uiautomator 无法直接使用的问题https://www.cnblogs.com/copyw ...
- 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这个来查 ...
- 【Android】【问题解决记录】Error obtaining UI hierarchy :Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
在使用uiautomatorviewer时遇到两类Error obtaining UI hierarchy报错,分别是: Error while obtaining UI hierarchy XML ...
- Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't
在使用真机定位页面元素时启动uiautomatorviewer.bat ,报错Error while obtaining UI hierarchy XML file: com.android.ddml ...
随机推荐
- 框架3.2--搭建V·P·N
目录 部署OpenVPN 一.服务端 1.安装openvpn和证书工具 2.生成服务器配置文件 3.准备证书签发相关文件 4.准备签发证书相关变量的配置文件 5.初始化PKI生成PKI相关目录和文件 ...
- 基于Xilinx XCKU115的半高PCIe x8 硬件加速卡
一.板卡概述 本板卡系我公司自主研发,采用Xilinx公司的XCKU115-3-FLVF1924-E芯片作为主处理器,主要用于FPGA硬件加速.板卡设计满足工业级要求.如下图所示: 二.功能和技术指标 ...
- MLHPC 2016 | Communication Quantization for Data-parallel Training of Deep Neural Networks
本文主要研究HPC上进行数据并行训练的可行性.作者首先在HPC上实现了两种通信量化算法(1 Bit SGD以及阈值量化),然后提出了自适应量化算法以解决它们的缺点.此外,发挥出量化算法的性能,作者还自 ...
- [LeetCode]1342. 将数字变成 0 的操作次数
给你一个非负整数 num ,请你返回将它变成 0 所需要的步数. 如果当前数字是偶数,你需要把它除以 2 :否则,减去 1 . 示例 1: 输入:num = 14 输出:6 解释: 步骤 1) 14 ...
- 微服务从代码到k8s部署应有尽有系列(七、支付服务)
我们用一个系列来讲解从需求到上线.从代码到k8s部署.从日志到监控等各个方面的微服务完整实践. 整个项目使用了go-zero开发的微服务,基本包含了go-zero以及相关go-zero作者开发的一些中 ...
- Abp 异常处理
Abp 异常处理 最近一直在读代码整洁之道,我在读到第三章函数的3.9 使用异常替代返回错误码,其实在我的开发经历中都是使用返回错误码给到前端,之前在阅读ABP官网文档中就有看到过使用异常替代异常的做 ...
- vmware 16 pro 安装macos
VMware 16 安装 MAC OS 10.13 原版(详细图文教程)关于虚拟机安装苹果系统的教程网络上有很多, 有些适合自己, 有些则不适合(教程中的版本老旧或工具资源消失), 在安装成功后选择用 ...
- Sencha Cmd 常用命令
1.获取帮助 sencha help generate app 2.创建应用程序 sencha -sdk e:\ext\ext6 generate app -classic SimpleCMS e:\ ...
- 【C#TAP 异步编程】构造函数 OOP
原文:异步 OOP 2:构造函数 (stephencleary.com) 异步构造带来了一个有趣的问题.能够在构造函数中使用会很有用,但这意味着构造函数必须返回一个表示将来将构造的值,而不是构造的值. ...
- 【C# 线程】线程池 epoll和IOCP之比较
总结:IOCP :我的打印文件放在店里面排队,轮到我打印了,店长帮我打印一下,打印好了通知我来拿 Epoll :我的打印文件放在店里面排队,轮到我叫我一下,我自己来打印. 直入正题:Epoll 是L ...