Android hierarchyviewer unable to load window data

I’m trying to use the hierarchyviewer tool to see the layout of my Android app.

I can run hierarchyviewer, and see the emulator running. I click on <Focused Window> and try to load the view hierarchy and get the error:

  • Android Studio Update: Some conflicts found in installation area
  • Modify alert() title (Javascript in Android Webview)
  • Android camera preview mapping to final picture
  • Exception - failed to resolve attribute at index 6: TypedValue
  • The Jar of this class file belongs to container 'Android Dependencies' which does not allow modifications to source attachments on its entries
  • Set menus for multiple toolbars on android
  • Unable to load window data for window <Focused Window> on device emulator-5554.

    I’m developing on OSX (10.6.5) using Eclipse 3.5.2. I’m currently debugging through Eclipse, in a custom-sized emulator. I have updated the Android tools to the latest (revision 8) with the AVD and SDK manager in Eclipse. I haven’t found any threads searching for the error message, or for general heirarchy viewer problems.

    Does anyone have an idea how to get the tool working?

    Related posts:

    How to get E6 format of Longitude Latitude for Google Maps on Android
    Error inflating class &lt;unknown&gt;
    Android Tabs + Sliding, how do I implement ActionBarSherlock?
    PagerTabStrip and PagerTitleStrip difference?
    Android EGL/OpenGL ES Frame Rate Stuttering
    Find usage of id not working in Android Studio on Windows
  • Get device angle by using getOrientation() function
  • Java last day of month problem
  • EditText and InputFilter cause repeating text
  • How to use Universal Image Loader
  • CoordinatorLayout with two floating action buttons
  • Counting Chars in EditText Changed Listener
  • 5 Solutions collect form web for “Android hierarchyviewer unable to load window data”

    I found an application’s view hierarchy does not load when the the app is under debug. Have you tried dismissing the debugger and just starting the app from the launch icon?

    In my case it was a carriage return character (U+000D) in one of my TextViews which prevented the hierarchyviewer from loading the window data.

    These thinks do not help in this case:

    • cleaning the project
    • deploying the app not in debug-mode
    • closing eclipse
    • running adb kill-server && adb start-server
    • trying other views like com.android.settings.Settings or com.android.development.Development (which worked fine)

    For mac add ~/work/android-sdk/tools$ ANDROID_HVPROTO=ddm monitor

    or steps outlined here: http://developer.android.com/tools/performance/hierarchy-viewer/setup.html

    For me, adding the INTERNET uses-permission to the manifest solved the problem:

    <uses-permission android:name="android.permission.INTERNET"/>
    
    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.