How to dump view hierarchy in an Android application

I want to profile my ui - it crashes on stackoverflow for the onDraw method

I was told because I have too many layers

I wanted to dump the view hierarchy to see how deep my layers

but when I try to load a hierarchical view, I get this error:

Error obtaining UI hierarchy Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist! 

How to fix it?

+8
android hierarchy
source share
2 answers

If we cannot solve this problem, since this is a known problem,

we can try monkey talk .

It provides a hierarchy of views with its own mechanism.

0
source share

You can also use the Genymotion emulator until it is fixed. uiautomatorviewer has no problems with this from my experience.

0
source share

All Articles