uiautomatorviewer報錯:java.lang.reflect.InvocationTargetException

在使用uiautomatorviewer對設備進行截屏時,出現異常
Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException

解決方法:
通過android studio對sdk tool進行了更新,從25.x 升級到了26.1.1
升級後sdk manager沒有界面了,uiautomatorviewer移動到 ./sdk.tools/bin目錄下,重新啓動後能夠正常截屏了。

另一種通過adb截屏的解決方法:

使用uiautomatorviewer報錯Error obtaining UI hierarchy

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章