when I run hierarchy in terminal. it can show the interface of it, but can not connect to my device.And it can connect to virtual emulator. It remind me in terminal like tha
For anyone working with Android 4.1 or later: you can get Hierarchy Viewer working by setting the environment variable ANDROID_HVPROTO to ddm.
Mac OSX/Android Studio users, remember to start hierarchy viewer from command line so it will pick up the environment variable. If you installed it with Android Studio, you can find it in /Users/
https://developer.android.com/tools/performance/hierarchy-viewer/setup.html