美文网首页
Unexpected error while obtaining

Unexpected error while obtaining

作者: 远在远方的风yzyfdf | 来源:发表于2020-04-11 17:10 被阅读0次

Android Studio升级3.1过后,Android Device Monitor工具找不到了,可以在\sdk\tools找到monitor.bat打开。

连接手机,选择应用后点击 dump View Hierarchy for UI automator

view.jpg
报错了。。。8.0以后的系统没法直接使用了
error.jpg

新的打开方式

  • 1.截取uix资源文件
    adb shell uiautomator dump /sdcard/screen.uix
    adb pull /sdcard/screen.uix D:/screen.uix

  • 2.截取截图
    adb shell screencap -p /sdcard/screen.png
    adb pull /sdcard/screen.png D:/screen.png

  • 3.打开uix
    选择Open File

    open.jpg
  • 4.打开截图

    open2.jpg

又可以愉快的分析UI了

success.jpg

相关文章

网友评论

      本文标题:Unexpected error while obtaining

      本文链接:https://www.haomeiwen.com/subject/omrumhtx.html