简体   繁体   中英

Android app not running; java.lang.OutOfMemoryError

I've searched around a bit and couldn't find anything relevant to my question or it didn't work. Anyways I'm getting an error message saying java.lang.OutOfMemoryError when I try running my app on my Android phone. There is plenty of space left on the phone so I don't see why there should be an error.

You should be more carefull about the of bitmap you are using in app. You must also aware of other general performance improvement tips. You can find in developer site how to scale a bitmap. https://developer.android.com/topic/performance/graphics/load-bitmap.html From this link you may get help to load large image.

Another possible solution is use of some image loader libraries like Glide, Picasso or UIL etc.

You can also find some helpfull tips to reduce memory usage from here...... https://lalitjadav.blogspot.in/2017/02/best-practices-for-memory-management.html?m=1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM