1.Download and Install Android studio from https://developer.android.com/studio/?gclid=CjwKCAiAkrTjBRAoEiwAXpf9Ca1elpQO4-roBhqiwirYqy1-CCqxfVSpGaQcum38H1rAP3eyUQULoxoC0ZUQAvD_BwE
2.In command prompt Navigate to the location C:\Users\username\AppData\Local\Android\Sdk\tools
3.Run monitor.bat
4.Launch Android studio
5.launch AVD Manager from Tools
6.Click on “Launch this AVD in emulator” icon to launch emulator.
7.In emulator open the App which you want to inspect.
8.In Android Device Monitor click on “Dump View Hierarchy for UI Automator” Icon
9.You will see Hierarchy in Android Device Monitor.