Android : How to solve java.lang.OutOfMemoryError while using bitmap?
<pre><code>i'm getting following error 

03-17 13:50:10.797: E/AndroidRuntime(32353): FATAL EXCEPTION: main
03-17 13:50:10.797: E/AndroidRuntime(32353): java.lang.OutOfMemoryError
03-17 13:50:10.797: E/AndroidRuntime(32353):    at      android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:493)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:299)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:324)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at com.raman.picture_change.EditItems.onActivityResult(EditItems.java:617)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.app.Activity.dispatchActivityResult(Activity.java:4581)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.app.ActivityThread.deliverResults(ActivityThread.java:2826)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.app.ActivityThread.handleSendResult(ActivityThread.java:2873)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.app.ActivityThread.access$1000(ActivityThread.java:125)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1057)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.os.Handler.dispatchMessage(Handler.java:99)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at android.os.Looper.loop(Looper.java:132)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at     android.app.ActivityThread.main(ActivityThread.java:4135)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at java.lang.reflect.Method.invokeNative(Native Method)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at java.lang.reflect.Method.invoke(Method.java:491)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
03-17 13:50:10.797: E/AndroidRuntime(32353):    at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p>I have used garbage collection at the ondestroy but no use. any help is appreciated and thanks in advance...</p>
