I've used hierarachyviewer earlier, but on android emulator. It works absolutely fine when I use it on the emulator. However it does not work with Samsung Galaxy TAB 7.0, with Android 2.3.4.
This is the log, that I get
11:04:22 E/hierarchyviewer: Unable to get view server version from device 303599
64881B00EC
11:04:22 E/hierarchyviewer: Unable to get view server protocol version from devi
ce 30359964881B00EC
11:04:24 E/hierarchyviewer: Unable to debug device 30359964881B00EC
11:05:05 E/hierarchyviewer: Unable to get view server version from device 303599
64881B00EC
11:05:05 E/hierarchyviewer: Unable to get view server protocol version from devi
ce 30359964881B00EC
11:05:07 E/hierarchyviewer: Unable to debug device 30359964881B00EC
11:09:38 E/hierarchyviewer: Unable to get view server version from device 303599
64881B00EC
11:09:38 E/hierarchyviewer: Unable to get view server protocol version from devi
ce 30359964881B00EC
11:09:40 E/hierarchyviewer: Unable to debug device 30359964881B00EC
I'm also not using hierarchyviewer in the debug mode, just running the application. Thanks.
Profile your layout with Hierarchy Viewer:
Set the environment variable
So from
[andrid-sdk]/tools
folder run this in Command Line:Or put
set ANDROID_HVPROTO=ddm
in thehierarchyviewer.bat
.the official documentation:Optimizing Your UI said so:
You can only use HierarachyViewer on the emulator and special developer phones bought from google.
http://groups.google.com/group/android-developers/browse_thread/thread/b0b0af7a316ca768
Quote from above link
I'm solved question in max os
this ANDROID_HVPROTO solution is documented here:
http://developer.android.com/tools/performance/hierarchy-viewer/setup.html
then try to close Android Studio
run adb kill-server, adb start-server
and launch monitor work to me!
the answer is :
https://github.com/romainguy/ViewServer/issues/14#issuecomment-75354479
@ozodrukh's answer is usefull.
I found a workaround: https://github.com/romainguy/ViewServer
Use the monitor-tool instead (
android-sdk/tools/monitor
).Connect to your device. Close Eclipse first if you can't connect.
Press the "Dump view hierarchy for UI automator" button in the devices-tab. Its the one next to the screen-capture button.
Works since API Level 16 (Android 4.1).