问题
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