When you are done with your bitmap, it means that when your Bitmap has completed its work, make it recyle and null, as shown below:
bitmap.recycle(); bitmap=null;
OR
I think you are loading Image from url, so I suggest you use Android Query for this, you will never get this error if you use it.
You can download the jar file from here: http://code.google.com/p/android-query/downloads/list Download the jar file and install jar in your build path.
AQuery androidAQuery=new AQuery(this);
As an example, to download an image directly from a URL:
androidAQuery.id(YOUR IMAGEVIEW).image(YOUR IMAGE TO LOAD, true, true, getDeviceWidth(), ANY DEFAULT IMAGE YOU WANT TO SHOW);
As an example, to get a bitmap with a URL:
androidAQuery.ajax(YOUR IMAGE URL,Bitmap.class,0,new AjaxCallback<Bitmap>(){ @Override public void callback(String url, Bitmap object, AjaxStatus status) { super.callback(url, object, status);
It is very fast and accurate, and with this you can find many other functions, such as animation at boot; obtaining a raster image, if necessary; and etc.
Pratik dasa
source share