4

I try to launch hierarchy viewer from my ~/Library/Android/sdk/tools directory, and it says

bash: hierarchyviewer: command not found. 

Although I can see the hierarchyviewer tool is in the directory by typing ls.

If I type which hierarchyviewer, nothing happens. I tried other questions from StackOverflow and nothing worked. Any idea?

jrzelling
  • 405
  • 2
  • 17
  • Refer to [Where is Hierarchy viewer](https://stackoverflow.com/a/45052557/6521116) – LF00 Jul 12 '17 at 08:39
  • [Does Android Studio have a Hierarchy Viewer?](https://stackoverflow.com/q/25390405/6521116) – LF00 Jul 12 '17 at 08:41

1 Answers1

3

I assume that ~/Library/Android/sdk/tools is not in your PATH variable. Then you'll have to start it via ./hierarchyviewer from the ~/Library/Android/sdk/tools directory (or via ~/Library/Android/sdk/tools/hierarchyviewer from anywhere).

cygery
  • 2,309
  • 3
  • 18
  • 25
  • Thanks! The command `./hierarchyviewer` launched it. I get a message: The standalone version of hieararchyviewer is deprecated. Please use Android Device Monitor (tools/monitor) instead. Probably not going to be much use. – jrzelling Jan 08 '15 at 16:31
  • I couldn't find it in the latest build version. Android has deprecated it :( – nizam.sp Jul 29 '17 at 09:05