Uiautomatorviewer報錯:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException


參考文章

https://blog.csdn.net/qq_38776582/article/details/105364683

https://blog.csdn.net/dengachao/article/details/100535536

費了很長時間一直解決不了ui automator viewer 分析控件的問題,原因說是ANDROID 8以上SDK的兼容性問題,最后還是按照上面這些參考文章提到的手動截圖的方法處理的.

步驟:

1.截取uix文件

adb shell uiautomator dump /sdcard/sc.uix

adb pull /sdcard/sc.uix

2.截圖

adb shell screencap -p /sdcard/sc.png

adb pull /sdcard/sc.png 

3.打開sdk tools目錄下的uiautomatorviewer.bat,導入從機器獲取的截圖和資源文件

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM