简体   繁体   中英

How to do a view hierarchy dump in android app

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

I've been told its because my ui has too many layers

I wanted to do a view hierarchy dump to see how deep my layers are

but when i try to load the hierarchyviewer 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 do i fix it?

If we can't fix this problem yet since it's a known problem,

we can try the monkey talk .

It provides a view hierarchy with its own mechanism.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM