tags:

views:

91

answers:

3

I am trying to run Hierarchy Viewer. developer.android.com says to

"Connect your device or launch an emulator.

From a terminal, launch hierarchyviewer from your SDK /tools directory."

I tried finding the hierarchy viewer in sdk/tools, but couldn't find it. I realize my difficulty may just be the result of me being a total noob so I could just be missing something basic.

What is a terminal? Do I need to start a java terminal to execute the viewer? If so, how?

Thanks!

A: 

I assume you are on windows.. to open a terminal window run start -> run and type "cmd". You should see a black window with a cursor.

You need to open the tools directory by typing cd C:\full\path\to\tools\directory filling in the path to where you installed the sdk.

If you type dir you should see a list of files located within the folder, one of which is hierarchyviewer.exe. Run that file (just type hierarchyviewer.exe)

Mayra
Thanks so much for the detailed response. The only place where I see hierarchyviewer is in the lib subfolder. Theres a Jar file there...
LuxuryMode
What version of the sdk did you download? It should definitly be in the tools folder, I don't have easy access to a windows box to see where it is in there though. Do you see other tools, like adb?
Mayra
I downloaded SDK_r07. I see other tools in there: adb, dmtracedump, emulator, etc1tool, fastboot, etc.
LuxuryMode
Wierd, that should have it. You might try just redownload the sdk. It might have gotten deleted somehow?
Mayra
Thanks. If I do that, should I just delete the entire directory that I installed SDK to or should I run an uninstall?
LuxuryMode
Did a fresh install. Still not seeing hierarchyviewer in the tools folder...
LuxuryMode
+1  A: 

(Sorry, I was meant to add this as a comment to Mayra's answer below)

I was using SDK_r06 and HierarchyViewer.exe was in the /tools folder.

I upgraded to SDK_r07 (using Android SDK and AVD Manager) and now HierarchyViewer.exe is not in the /tools folder.

I re-downloaded the SDK from the Android website and it is not in the /tools folder.

Has it been left out of the SDK_r07 release of the SDK?

Aussie
A: 

Just had the same issue. It looks like version 7 of SDK Tools does not include the executable for unknown reason (you may download the SDK and see that it's not there). Therefore, an update removes the executable even if it was there before. However, the executable is not an *.exe, but just a *.bat, which uses the HierarchyViewer.jar in the lib folder.

So I just copied the hierarchyviewer.bat file from the 6th version into the tools folder and it worked.
Note, that you have to type hierarchyviewer or hierarchyviewer.bat to start it, not hierarchyviewer.exe.

Coryffaeus
Should I download Release 1.6 r1 from September 2009 ? If not, where can I get 6th version?
LuxuryMode
@Coryffaeus bingo!
LuxuryMode