在DDMS的device中可以看到设备,并显示可以debug的状态,可以看到不显示进程的信息,但是hierarchyviewer也却不显示各个Window。

在控制台的打印信息如下:

- hierarchyviewer]Unable to get view server version from device emulator-5554

- hierarchyviewer]Unable to get view server protocol version from device emulator-5554
 - ViewServerDevice]Unable to debug device: emulator-5554
 - hierarchyviewer]Missing forwarded port for emulator-5554

- hierarchyviewer]Unable to get the focused window from device emulator-5554

解决办法:

重新启动adb server,运行如下命令:

在root权限下adb kill-server

adb start-server

重新打开hierarchyviewer,如下图,可以正常运行

05-07 15:10