本文介绍了UI Automator Viewer:接收“采取错误的设备屏幕截图:null";每次从AVD设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这仅在AVD管理器中的AVD设备上发生.从Genymotion捕获uiautomatorviewer屏幕截图时,我从不会收到此错误.

This only happends on the AVD devices within the AVD manager. I never get this error when capturing uiautomatorviewer screenshots from Genymotion.

尝试在AS中的Android设备监视器中捕获时...它为我提供了更多详细信息:原因:获取UI层次结构时出错

When attempting to capture within the Android Device Monitor in AS...it gives me a little more detail:Reason:Error obtaining UI hierarchy

推荐答案

如果可以,请在关闭HAXM加速的情况下进行尝试.我必须使用配置文件运行测试,然后在物理设备上运行测试以获取屏幕快照.本质上,如果AVD选中了使用GPU"或快照"-即使在USB连接的设备上运行,截图也会失败.根据涉及成熟Appium平台的开发人员的说法,这是uiautomator中的错误.

Try it with HAXM acceleration turned off, if you can. I had to run the test using a profile that then ran the test on a physical device to get the screen shots. Essentially, if the AVD has Use GPU or Snapshot selected - even if running on a USB attached device, screenshots fail. This is a bug in uiautomator according to the developers involved with maturing the Appium platform.

这篇关于UI Automator Viewer:接收“采取错误的设备屏幕截图:null";每次从AVD设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 08:51