Android:java.lang.OutOfMemoryError: Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to show the Bitmap image in ImageView from sd card which is stored already. After run my application is crash and getting OutOfMemoryError error of: (java.lang.OutOfMemoryError: Failed to allocate a 23970828 byte allocation with 2097152 free bytes and 2MB until OOM) I have no idea or why its out of memory. I think my image size is very large so I tried to change it. Iterator it = imageArray.iterator(); while (it.hasNext()) { Object element = it.next(); String objElement = element.toString(); Log.e("objElement ", " = " + objElement);