Throwing OutOfMemoryError on Huawei Honor 7

六月ゝ 毕业季﹏ 提交于 2019-12-25 11:53:25

问题


we develop an app in that you have a profil with profile picture and background image (blurred profile image) and other stuff. On all my 4 Samsung devices (S2, S3 mini, S4, S6) and on the Nexus 4 the App runs without any problems. But on the Huawei Honor 7 I get this message:

OutOfMemoryError "Failed to allocate a 31806012 byte allocation with 4194304 free bytes and 24MB until OOM"

The option largeHeap is set to true in the manifest. Is there any possibility to get the app to work on this device? I think the heap size is too small.

I know there are several things to optimize the App. For example I could set all used images to null after usage. But at the start there are not very much images that are used. I wonder why the App tries to allocate 31MB memory but the device only offers 4MB memory.


回答1:


You can close some methods or pics to target the problem.Good luck, I guess it's the phone problem.



来源:https://stackoverflow.com/questions/34674539/throwing-outofmemoryerror-on-huawei-honor-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!