使用ViewServer让Android真机可用HierarchyView视图检测工具
HierarchyViewer是Android SDK自带的用于布局检测的工具,其位置在\Android SDK目录\tools目录下,关于使用HierarchyView优化Android布局的方法,可以参考官方的这篇文章:http://developer.android.com/training/improving-layouts/optimizing-layout.html
但是该工具并不支持直接连接真机进行检测,连接真机时会报如下错误:
01:47:20 E/hierarchyviewer: Unable to get view server protocol version from device e8ef8e7e
01:47:20 E/ViewServerDevice: Unable to debug device: xiaomi-hm_note_1lte-e8ef8e7e
01:47:20 E/hierarchyviewer: Missing forwarded port for e8ef8e7e
01:47:20 E/hierarchyviewer: Unable to get the focused window from device e8ef8e7e<