使用uiautomatorviewer 查看android某些页面元素,出现错误Error obtaining UI hierarchy  Reason: Error taking device screenshot: null 

uiautomatorviewer 查看元素报错: Error taking device screenshot: null 原因

 

使用adb 的screencap  截图,拉取出来的图片大小也为0kb。

adb shell screencap -p /data/local/tmp/tmp.png
adb pull /data/local/tmp/tmp.png

向开发了解,原来是研发限制了截屏功能,导致无法获取必要的信息。让研发开放测试版本的截屏功能就好了

 

相关文章:

  • 2021-11-14
  • 2022-01-18
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2021-05-08
  • 2021-08-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-24
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
相关资源
相似解决方案