android 9.0系统不能用uiautomator识别

解决方法:android 8.0 以后 uiautomator 无法直接使用的问题https://www.cnblogs.com/copyworker/p/11043705.html

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

可以使用以下方法手动截取。

首先操作机器定位到要分析的界面。

1.截取uix资源文件

adb shell uiautomator dump /sdcard/screen.uix

adb pull /sdcard/screen.uix D:/screen.uix

注明:新手机地址改成:/data/local/tmp/**.uix

2.截取截图

adb shell screencap -p /sdcard/screen.png

adb pull /sdcard/screen.png D:/screen.png

打开sdk tools目录下的uiautomatorviewer.bat,导入从机器获取的截图和资源文件

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

  1. 【Mac+Android+uiautomatorviewer】之报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException

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

  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. 015_matlab运行C语言

    视频教程:https://v.qq.com/x/page/q3039wsuged.html 资料下载:https://download.csdn.net/download/xiaoguoge11/12 ...

  2. MVVM架构方式

    一.概念 ①常见的架构方式或者开发思想还有MVC.MVP和MVVM,参考文章:MVC,MVP 和 MVVM 的图示 ②MVC:视图(View),指用户界面:控制器(Controller),指业务逻辑: ...

  3. cogs 998. [東方S2] 帕秋莉·诺蕾姬

    二次联通门 : cogs 998. [東方S2] 帕秋莉·诺蕾姬 交上去后发现自己没上榜 就想着加点黑科技 把循环展开一下 结果WA了.. 万恶的姆Q /* cogs 998. [東方S2] 帕秋莉· ...

  4. 【JZOJ6230】【20190625】梦批糼

    题目 一个$n\times m \times l $的立方体,有一些位置有障碍 一次操作会随机选择一个立方体,共有\(w\)次操作 询问所有操作都不选到障碍点,被选到至少一次的点的期望 $n ,m,l ...

  5. PHP Record the number of login users

    Function to record how many times the user logs in Connect to the database first: you can create a n ...

  6. Linux常用命令简述--dirname与basename

    dirname 获取父目录 basename 显示最后的目录名或文件名 .dirname [root@liang ~]# dirname /etc/httpd/ /etc [root@liang ~] ...

  7. 第08组 Beta冲刺(4/4)

    队名 八组评分了吗 组长博客链接(5分) ( https://www.cnblogs.com/leemelon/p/12040924.html ) 作业博客 [作业链接] (https://edu.c ...

  8. 第08组 Alpha冲刺(1/4)

    队名 八组评分了吗 组长博客 小李的博客 作业博客 作业链接 组员1(组长) 过去两天完成了哪些任务 文字/口头描述 11月9号开小会安排alpha冲刺开始的工作,进行任务分工,具体见11.09会议记 ...

  9. DNA replication timing数据库 - Replication Domain

    DNA Replication Timing ReplicationDomain: a visualization tool and comparative database for genome-w ...

  10. Db2 Terminate Vs Connect Reset , Disconnect

    db2 Terminate and db2 connect Reset both break the connection to a database.                Connect ...