【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这个来查 ...
随机推荐
- 红黑树实现(c/c++)
红黑树 简介 一直想写的一种数据结构,非常厉害的思想,插入,删除,查找,修改,都是\(log_2 n\)的时间复杂度. 比AVL更强大的是,插入删除综合效率比AVL要优秀一点. 性质 一颗红黑树是满足 ...
- python循环删除列表元素留一个问题
https://www.cnblogs.com/baihualin/p/10698651.html 引用up
- 线上IIS应用程序池自动关闭
事情的经过是这样的: 下午下班的铃声已经敲响,我已经整装待发.突然同事说某水司的微信公众号不能正常访问了.点击营业厅,直接提示Service Unavailable. 立马远程服务器查看,IIS微信公 ...
- docker私有仓库操作(搭建、运行、添加、删除)
目录 运行私有仓库 TIPS: 上传 把镜像放入私有仓库 验证 查看 TIPS: 垃圾回收 问题排查 参考:https://yeasy.gitbooks.io/docker_practice/cont ...
- Python基础(一)--变量、注释、文件头
一.变量 1.什么是变量 变量是变化的量,用来保存程序执行的状态以及状态的变化 2.变量定义规范 #1. 变量名只能是:字母.数字或下划线的任意组合 #2. 变量名的第一个字符不能是数字 #3. 关键 ...
- k8s dashboard 解决secret自建证书导致浏览器访问限制
解决参考: https://www.jianshu.com/p/c6d560d12d50 熟悉dashboard yaml文件所创建的资源 wget https://raw.githubuserc ...
- Java的自动拆装箱与Integer的缓存机制
转载请注明原文地址:https://www.cnblogs.com/ygj0930/p/10832303.html 一:基本类型与包装类型 我们知道,Java有8大基本数据类型,4整2浮1符1 ...
- 使用Qemu运行Ubuntu文件系统 —— 搭建SVE学习环境(2)
开发环境 PC:ubuntu18.04 Qemu:4.1 Kernel:Linux-5.2 概述 由于要学习ARM的SVE技术,但是目前还没有支持SVE指令的板子,所以只能用Qemu来模拟,但是发现Q ...
- 简述 gevent模块的作用和应用场景。
当一个greenlet遇到IO操作时,比如访问网络,就自动切换到其他的greenlet,等到IO操作完成, 再在适当的时候切换回来继续执行.由于IO操作非常耗时,经常使程序处于等待状态, 有了geve ...
- 非vue等框架中html 中使用es6的模块用法小结
以下是html中使用es6模块化引入的方法 一.html中的引入 <!DOCTYPE html> <html lang="en"> <head> ...