How to get to viewing the hierarchy when running the application on my device connected to Android studio

Ok, so I'm trying to get to know an android studio and play with several projects. My question is: how can I start or debug the application and then open the hierarchy view. If I try to open the monitor of Android devices while the application is running, I get the message: "After the end of the debugging sessions, they will be closed: xx". I see a small Android DDMS window that opens during debugging or startup, where I see the trace tracking and distribution tracking options, but what about viewing the hierarchy?

+1
source share
2 answers

I'm not sure about gui, but there are instructions for starting it from cli, here .

  1. From the terminal, start a hierarchical view from the <sdk>/tools/ directory.

You can define your <sdk> directory in Android Studio via: File β†’ Project Structure β†’ SDK Location

+3
source

do the following:

./Users/<YourUser>/Library/Android/sdk/tools/bin/uiautomatorviewer

I made an alias for it:

alias viewer='./Users/<YourUser>/Library/Android/sdk/tools/bin/uiautomatorviewer'

the path may be different, so find it:

 locate uiautomatorviewer 
0
source

All Articles