安卓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的更多相关文章

  1. 【Uiautomatorviewer】报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationT...

    android 9.0系统不能用uiautomator识别 解决方法:android 8.0 以后 uiautomator 无法直接使用的问题https://www.cnblogs.com/copyw ...

  2. UIautomatorviewer连接设备报错Unexpected error while obtaining UI hierarchy

    先来看下现象哈,点击sdk/tools下uiautomatorviever.bat,点击连接设备的图标,本以为就这么简单,那你就错了: 是不是看到这个瞬间心情就不好了,那么我们该怎么解决这个问题呢,归 ...

  3. 使用Axis2 插件 报错"An error occurred while completing process -java.lang.reflect.InvocationTargetException"

    参考 http://blog.csdn.net/sunitjy/article/details/6793654

  4. android-tools下的uiautomatorviewer截图,提示“Unexpected error while obtaining UI hierarchy”

    使用原来工具下的uiautomatorviewer对android 5.1.0的手机,进行截图,是正常的,切换到android10截图,就报错"Unexpected error while ...

  5. mavne install 报错org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException

    maven install 报错 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.Invoc ...

  6. Android8 以上使用 UIautomator Viewer提示Unexpected error while obtaining UI hierarchy报错(方法二)

    一:最常见的一个问题就是:Android8及以上的系统无法获取到页面,提示报下面的错误 二:解决办法 1.下载新的tools,在下面链接里找到SDK tools下载 http://www.androi ...

  7. 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 ...

  8. error while obtaining ui hierarchy xml file...用 uiautomatorviewer 获取安卓手机软件页面时报错

    Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't ...

  9. uiautomatorviewer 报错 Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!

    在进行自动化时经常需要使用到 uiautomatorviewer获取控件的各个属性,然后在脚本中通过各个控件的属性来操作. 如果使用的是uiautomator2的话,一般都是使用weditor这个来查 ...

随机推荐

  1. 为什么你要使用这么强大的分布式消息中间件——kafka

    为什么是kafka? 在我们大量使用分布式数据库.分布式计算集群的时候,是否会遇到这样的一些问题: 我们想分析下用户行为(pageviews),以便我们设计出更好的广告位 我想对用户的搜索关键词进行统 ...

  2. vue3修改link标签默认icon无效问题

    vue3修改link中标签默认icon,vue3初次使用的时候不好好阅读配置难免会遇到一些坑,本人在项目完结的时候打算把浏览器的导航小icon图标给替换了,可是并没有那么顺利,那么如何在vue3中替换 ...

  3. Get SAP Code Page by External Name

    CL_ABAP_CODEPAGE - SAP_CODEPAGE 取SAP对应code page内码:

  4. JVM问题排查工具:Serviceability-Agent介绍

    本文首发于微信公众号:javaadu 简单介绍 构建高性能的Java应用过程中,必然会遇到各种各样的问题,像CPU飙高.内存泄漏.应用奔溃,以及其他疑难杂症,这时可以使用Serviceability ...

  5. CENTOS安装xwindow

    CentOS6安装图形界面 [root@centos6~]# yum -y install xorg* [root@centos6 ~]# yum -y groupinstall "X Wi ...

  6. 【前端_React】Node.js和webpack的安装

    第一步——安装Node.js 首先要安装Node.js,Node.js自带了软件包管理工具npm,可以使用npm安装各种插件.Node.js的下载地址 可以自定义安装到指定的路径下,待安装完成后命令行 ...

  7. 交叉编译tmux

    作者:彭东林 邮箱:pengdonglin137@163.com 参考 https://gist.github.com/tessus/5e118d44261a6ab2f198 环境 Qemu-4.1 ...

  8. java 深copy

    public static<T> T deepClone(T src) throws IOException, ClassNotFoundException { Object obj = ...

  9. xadmin引入django-rest-framework

    一.安装: pip install djangorestframework 安装djangorestframework库 https://github.com/encode/django-rest-f ...

  10. 18-C#笔记-继承

    1. 子类可以使用父类的成员和函数. 和C++不同,使用的是一个冒号 2. 不支持多重继承 但是可以通过接口(interface)这种结构实现.后续讲解. using System; namespac ...