报错

使用Uiautomatorviewer连接真机报错Unexpected error while obtaining UI hierarchy (获取UI层次结构时出现意外错误)

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

解决

  1. 在D:\Java\android-sdk\tools(路径自己定义就行)目录下创建app.uix文本文件
  2. 在D:\Java\android-sdk\tools(路径自己定义就行)目录下创建app.png文本文件
  3. 执行以下adb命名
    • adb shell uiautomator dump /sdcard/app.uix
    • adb pull /sdcard/app.uix D:\Java\android-sdk\tools\app.uix
    • adb shell screencap -p /sdcard/app.png
    • adb pull /sdcard/app.png ‪D:\Java\android-sdk\tools\app.png
  4. 运行uiautomatorviewer.bat,导入文件

5.再次点击连接,即可

【已解决】Uiautomatorviewer报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationT...的更多相关文章

  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. 【Mac+Android+uiautomatorviewer】之报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException

    安卓8.0以后uiautomatorviewer会报错,解决办法如下: 参考:<android 8.0 以后 uiautomator 无法直接使用的问题> 步骤一: 先执行命令:(注意:想 ...

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

随机推荐

  1. 【pwn】[SWPUCTF 2022 新生赛]InfoPrinter--格式化字符串漏洞,got表劫持,data段修改

    下载附件,checksec检查程序保护情况: No RELRO,说明got表可修改 接下来看主程序: 函数逻辑还是比较简单,14行出现格式化字符串漏洞,配合pwntools的fmtstr_payloa ...

  2. Educational Codeforces Round 127 (Rated for Div. 2) E. Preorder

    设\(f[v]\)是以结点\(v\)为根的方案数,设左子树的根为\(x\),右子树的根为\(y\),那么如果左右子树完全相同,那么我们交换左右子树对方案没有任何影响,都是: \[f[v] = f[x] ...

  3. 暴力+分治+贪心+DP:最大子序列和

    给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和. 示例: 输入: [-2,1,-3,4,-1,2,1,-5,4], 输出: 6 解释: 连续子数组 ...

  4. .NET 8 Video教程介绍(开篇)

    教程简介 本文将简单描述视频网站教程,视频网站是一个类似于腾讯视频一样的网站,视频资源用户自己上传,然后提供友好的界面查看视频和搜索视频,并且提供管理页面对于视频进行管理,我们将使用Blazor作为前 ...

  5. iOS内存管理机制

    这世上,没有谁活得比谁容易,只是有人在呼天抢地,有人在默默努力.   随着科技的发展,移动设备的内存越来越大,设备的运行速度也越来越快,但是相对于整个应用市场上成千上万的应用容量来说,还是及其有限的. ...

  6. Python输入一行字符,分别统计出其中大小写英文字母、空格、数字和其它字符的个数。

    import string def SlowSnail(s): up = 0 low = 0 space = 0 digit = 0 others = 0 for c in s: if c.isupp ...

  7. 【学到一个新名词】String interning(字符串驻留/字符串内部化)

    作者:张富春(ahfuzhang),转载时请注明作者和引用链接,谢谢! cnblogs博客 zhihu Github 公众号:一本正经的瞎扯 在阅读 VictoriaMetrics v1.95.1 的 ...

  8. 华为ar502H物联网边缘计算网关,在容器内控制/dev/do0开关命令

    执行以下命令进行开关do继电开关,可以听见电位器声音. echo -en  "\x01" > /dev/do0 echo -en  "\x00" > ...

  9. js检测数据类型得四种方式

    1.typeof:返回一个字符串,表示操作数的类型. 语法: typeof(变量) //or typeof 变量 示例:     console.log(typeof 2)//number     c ...

  10. STM32外设:最小系统、低功耗模式

    最小系统 启动引脚 BOOT0.BOOT1:用于设置系统的启动方式 下载引脚 JTAG的IO:JTMS.JTCK.JTDI.JTDO.NJTRST SW的IO:SWDIO.SWCLK 硬件设计 NUC ...