In the Android development process, often encounter oom problem, for many reasons, one of the most difficult to deal with is the picture caused by oom, so on the network compared to several images loaded library, finally chose the Facebook Fresco library (GitHub address: https:// Github.com/facebook/fresco).
Fresco has done a good job of memory processing, with almost no problems with the previous 5.0 systems, but the problem will occur on some 5.0 models.
Solution:
1. Network pictures using more reasonable drawing rules
2. Change the picture to WEBP
3. Judging the exception of oom when image compression
Set Android:largeheap=true https://github.com/facebook/fresco/issues/768 in 4.manifest file
The 1.2.3 scheme optimizes memory or reduces oom anomalies, and the 4 scheme increases the heap size by 4-5 times larger than the normal allocation heap, which solves most of the current oom problems
"declaration"
Welcome reprint, but please keep the original source of the article
Blog Address: http://www.cnblogs.com/lping/
Article Source: http://www.cnblogs.com/lping/articles/5470716.html
Android Picture Memory issues