Exception analysis based on transactiontoolargeexception

The keyword of the exception is: android.view.infiateexception: binary XML file line #11: error infiating class

It is explained in the official document that the maximum limit of binder is 1MB. If it is greater than 1MB, an exception of transactiontoolargeexception will be thrown.

Corresponding solution: do not transfer a large amount of data into binder, such as pictures.

This crash often appears in the image sharing function, because we want to share large images with a third-party SDK.

In addition, you can also see this kind of crash when collecting dotting data, because the dotting mechanism does not send it every time you click the button,

Instead, the data is accumulated to a certain amount before sending. If the threshold is too large, the transactiontoolargeexception exception will be thrown.

The above exception analysis based on transactiontoolargeexception is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>