Android out of memory exception -
please in solving me out of memory exception unable solve it, appreciated,
06-04 12:11:44.119: e/androidruntime(9090): fatal exception: main 06-04 12:11:44.119: e/androidruntime(9090): process: com.zar.bdr, pid: 9090 06-04 12:11:44.119: e/androidruntime(9090): java.lang.outofmemoryerror 06-04 12:11:44.119: e/androidruntime(9090): @ android.graphics.bitmapfactory.nativedecodeasset(native method) 06-04 12:11:44.119: e/androidruntime(9090): @ android.graphics.bitmapfactory.decodestream(bitmapfactory.java:594) 06-04 12:11:44.119: e/androidruntime(9090): @ android.graphics.bitmapfactory.decoderesourcestream(bitmapfactory.java:429) 06-04 12:11:44.119: e/androidruntime(9090): @ android.graphics.drawable.drawable.createfromresourcestream(drawable.java:840) 06-04 12:11:44.119: e/androidruntime(9090): @ android.content.res.resources.loaddrawable(resources.java:2113) 06-04 12:11:44.119: e/androidruntime(9090): @ android.content.res.resources.getdrawable(resources.java:700) 06-04 12:11:44.119: e/androidruntime(9090): @ android.graphics.drawable.statelistdrawable.inflate(statelistdrawable.java:176) 06-04 12:11:44.119: e/androidruntime(9090): @ android.graphics.drawable.drawable.createfromxmlinner(drawable.java:937) 06-04 12:11:44.119: e/androidruntime(9090): @ android.graphics.drawable.drawable.createfromxml(drawable.java:877) 06-04 12:11:44.119: e/androidruntime(9090): @ android.content.res.resources.loaddrawable(resources.java:2095) 06-04 12:11:44.119: e/androidruntime(9090): @ android.content.res.typedarray.getdrawable(typedarray.java:602)
solution 1: can use android:largeheap="true"
in activity's manifest request larger heap size, not work on pre honeycomb devices.
solution 2: use image loader library like,
which takes headache of loading large image file, supports additional feature caching , converting.
Comments
Post a Comment