Issue
So I'm trying to see what is producing this error but I can´t see where is the problem. . I know that this error is produced because some images are too big so memory can´t be reserved for it. but I have been a couple of days trying to see what image is making this error to show but I can´t see it.Hope someone can help me. This is stack trace:
java.lang.OutOfMemoryError:
Solution
So it's a user crash. You are out of luck then. So you have a user with a cheap device that can't handle that image. :)
The best I can suggest:
- Create a downscaled version of the image
- Do a
try/catch
inActivityWorkout.onCreate
- Capture the out-of-memory exception
- Set a "this is a low-memory device" flag in the settings (use
SharedPreferences
) - Before loading the layout, read that flag
- Depending on its value, conditionally use either the full, or the downscaled version of the image
Answered By - Seva Alekseyev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.