环境Android Studio

问题:Unexpected error while obtaining screenshot from device: EOF

提示框:Unexpected error while obtaining screenshot from device: EOF

解决方案

排查一下是否APP限制截屏,搜索下面禁止截屏代码

getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);

添加判断在debug模式取消此限制

if (!BuildConfig.DEBUG) {getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
}

Unexpected error while obtaining screenshot from device: EOF相关推荐

  1. Unexpected error while obtaining UI hierarchy:使用uiautomatorviewer定位元素报错

    1.问题描述 在使用Uiautomatorviewer 进行元素定位时,点击 快照 按钮出现以下错误: 2.发生原因 Unexpected error while obtaining UI hiera ...

  2. Appium+Python连接真机、跳过登录页、Unexpected error while obtaining UI hierarchy问题

    Appium连接真机 使用数据线连接电脑,然后选择文件传输方式 打开手机设置拉至底部,点击关于手机,连续点击7次版本号打开开发者模式 点击设置中的系统与更新,找到开发者选项----> 打开USB ...

  3. 【学习笔记】【MAC】uiautomatorviewer定位华为P30手机报错Unexpected error while obtaining UI hierarchy

    报错信息 Unexpected error while obtaining UI hierarchy details: Unexpected error while obtaining UI hier ...

  4. uiautomatorviewer报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTarget

    完美解决方案 官方完美解决方案 偏方解决方案 uiautomatorviewer报错 原因:uiautomatorviewer不支持Android8.0之后的版 解决办法:使用别人二次开发好的uiau ...

  5. UI Automator Viewer Error while obtaining UI hierarchy XML file

    Error obtaining UI hierarchy Reason: Error while obtaining UI hierarchy XML file: com.android.ddmlib ...

  6. CDH5之Unexpected error.Unable to verify database connection

    在部署好CDH5(HDFS+MapReduce+Zookeeper)后,某一天想要通过web界面来添加Hive或者Oozie服务.  添加Hive组件服务: 1.报错:Unexpected error ...

  7. [INS-08109] Unexpected error occurred while validating inputs at state 'getOCMDetails'.

    在ORACLE11G R2 安装ORACLE时出现以下错误: [INS-08109] Unexpected error occurred while validating inputs at stat ...

  8. WSS 3.0中An unexpected error has occurred的一个解决方案

    之前在CodePlex上讨论到我在WSS v3里遇到的一个Bug,CKS团队的TheKid向我引用了他的一个解决方案,大意如下 如果需要了解WSS 3.0中An unexpected error ha ...

  9. Android之Unexpected error while executing: am start -n “***.Activity“-a android.intent.action.MAIN

    1 问题 编译项目的时候,as错误提示如下 $ adb shell am start -n "package/package.***Activity" -a android.int ...

  10. yarn安装依赖包报错 error An unexpected error occurred: “https://registry.npm.taobao.orgnpm/element-ui: get

    yarn安装依赖包报错,error An unexpected error occurred: "https://registry.npm.taobao.orgnpm/element-ui: ...

最新文章

  1. Python之Pandas:pandas.DataFrame.to_csv函数的简介、具体案例、使用方法详细攻略
  2. php mysql建表_mysql建表测试
  3. 计划Java EE 7批处理作业
  4. Solaris11创建NFS服务
  5. python生成加密exe_python加密保护-加密exe文件
  6. Pandas汇总不同excel工作簿中的表格并合并同类数据
  7. Wingdings 2 符号编码对照表
  8. 5个物联网商业案例及其带给我们的启示
  9. 神经网络是什么,神经网络具体有什么用?
  10. 计算机无法屏保,电脑屏幕保护程序为什么不能修改 原因及解决方法【详细介绍】...
  11. mssql注入和mysql注入_MSSQL注入代码
  12. ubuntu下.chm文档查看工具
  13. Python中万年历的代码实现
  14. 时尚简约风格的ae字幕条模板
  15. 适配iOS 11和iPhone X——导航栏、UITableView
  16. open /run/flannel/subnet.env: no such file or directory
  17. 820计算机基础学校,[定稿]计算机基础教案33820V5.1(全文完整版)
  18. Matlab中的逻辑运算
  19. 闲逸联运平台为何迎来加盟热?
  20. 【LOJ6197】法克(最长反链)

热门文章

  1. Downward paths
  2. 系统全面的认识Solr
  3. CSDN-markdown总结前辈经验
  4. unity打包的安卓游戏在某些设备显示异常问题解决
  5. ubuntu桌面进不去的解决办法
  6. 省市县及对应编码-json格式
  7. Exp7 网络欺诈防范 ————20164316张子遥
  8. Python 【人工智能】【大数据】【全栈】【自动化】技能-张子夜-专题视频课程...
  9. navicat mysql server has gone away_Navicat中MySQL server has gone away错误怎么办
  10. puts和printf的区别