Hi friends, I am getting the below exception 03-24 19:19:25.605: ERROR/AndroidRuntime(7870): Uncaught handler: thread main exiting due to uncaught exception 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:447) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.content.res.Resources.loadDrawable(Resources.java:1705) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.content.res.Resources.getDrawable(Resources.java:580) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at com.google.android.maps.MyLocationOverlay.getCompassBase(MyLocationOverlay.java:192) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at com.google.android.maps.MyLocationOverlay.onSensorChanged(MyLocationOverlay.java:314) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.hardware.SensorManager$LegacyListener.onSensorChanged(SensorManager.java:1380) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.hardware.SensorManager$ListenerDelegate$1.handleMessage(SensorManager.java:435) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.os.Handler.dispatchMessage(Handler.java:99) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.os.Looper.loop(Looper.java:123) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at android.app.ActivityThread.main(ActivityThread.java:4363) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at java.lang.reflect.Method.invokeNative(Native Method) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at java.lang.reflect.Method.invoke(Method.java:521) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 03-24 19:19:25.651: ERROR/AndroidRuntime(7870): at dalvik.system.NativeStart.main(Native Method)
after downloading the image i am keeping it in an ArrayList<Bitmap>, and in onDestroy i am doing the below. image size is 31kb there are some 8 images. @Override protected void onDestroy() { super.onDestroy(); for(int i =0;i<barcode_bitmap.size();i++) { if(barcode_bitmap.get(i)!=null) { barcode_bitmap.get(i).recycle(); } } for(int i =0;i<imgurl_bitmap.size();i++) { if(imgurl_bitmap.get(i)!=null) { imgurl_bitmap.get(i).recycle(); } } } Please reply,its very urgent -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en