美文网首页
Fresco OutOfMemoryError 内存不足导致的崩

Fresco OutOfMemoryError 内存不足导致的崩

作者: HaRun | 来源:发表于2017-04-07 15:39 被阅读0次

我在项目中使用Fresco,在xml layout文件中设置fresco:placeholderImage,这个可能导致内存暴涨的原因,出现错误:
<pre>
OutOfMemoryError
//并且
Binary XML file line * Error inflating class
</pre>
可以查看:https://github.com/facebook/fresco/issues/734

本以为最基础的设置应该没有问题,却是罪魁祸首,你可以试试把
<pre>
fresco:placeholderImage="@drawable/empty_collection"
fresco:placeholderImageScaleType="centerCrop"
</pre>
去掉试试。

相关文章

网友评论

      本文标题:Fresco OutOfMemoryError 内存不足导致的崩

      本文链接:https://www.haomeiwen.com/subject/dqphattx.html