Error message : Unable to get view server version


#1

Hi,

I have the following error messages on console of DDMS:

Hierarchy Viewer
[2013-10-29 20:54:13 - hierarchyviewer]Unable to get view server version from device XXXXXXXXXX
[2013-10-29 20:54:13 - hierarchyviewer]Unable to get view server protocol version from device XXXXXXXXXX
[2013-10-29 20:54:13 - ViewServerDevice]Unable to debug device: sony_ericsson-so_03d-XXXXXXXXXX
[2013-10-29 20:54:13 - hierarchyviewer]Missing forwarded port for XXXXXXXXXX
[2013-10-29 20:54:13 - hierarchyviewer]Unable to get the focused window from device XXXXXXXXXX
[2013-10-29 21:04:20 - hierarchyviewer]Unable to get view server version from device emulator-5554
[2013-10-29 21:04:20 - hierarchyviewer]Unable to get view server protocol version from device emulator-5554
[2013-10-29 21:04:20 - ViewServerDevice]Unable to debug device: emulator-5554
[2013-10-29 21:04:20 - hierarchyviewer]Missing forwarded port for emulator-5554
[2013-10-29 21:04:20 - hierarchyviewer]Unable to get the focused window from device emulator-5554

  • XXXXXXXXXX is the name of my hardware device.

What are they?


#2

Hierarchy viewer requires a view server to be running on your device. This requires your device to be rooted, which usually means you can’t use a hardware device.

To use hierarchy viewer on your hardware device without rooting it, integrate and use this code from Romain Guy: https://github.com/romainguy/ViewServer


#3

Phillips, Thank you for your reply.
But even on emulator, I’ve got the following error messages when I tried to “Load View Hierarchy”:

[2013-10-30 17:40:30 - hierarchyviewer]Error reading view hierarchy stream: null
[2013-10-30 17:40:30 - hierarchyviewer]Unable to load window data for window com.bignerdranch.android.geoquiz/com.bignerdranch.android.geoquiz.QuizActivity on device emulator-5554
[2013-10-30 17:40:30 - hierarchyviewer]null

Is there any additional steps required to use hierarchy viewer?

Thanks,


#4

My best guess is that there’s a character being used in a string somewhere in your layout file that’s causing issues. Unfortunately the error message here isn’t enough to have any solid idea of what’s going on.