What to do on TransactionTooLargeException

前端 未结 30 3904
盖世英雄少女心
盖世英雄少女心 2020-11-22 03:08

I got a TransactionTooLargeException. Not reproducible. In the docs it says

The Binder transaction failed because it was too large.

D

30条回答
  •  梦谈多话
    2020-11-22 03:23

    I too got this exception on a Samsung S3. I suspect 2 root causes,

    1. you have bitmaps that load and take up too much memory, use downsizing
    2. You have some drawables missing from the drawable-_dpi folders, android looks for them in drawable, and resizes them, making your setContentView suddenly jump and use a lot of memory.

    Use DDMS and look at your heap as you play your app, that will give you some indication on which setcontentview is creating the issue.

    I copied all the drawables across all folders to get rid of problem 2.

    Issue is resolved.

提交回复
热议问题