Android. OutOfMemory problems
===

I require displaying many images in my application. These being jpgs and pngs and i'm loading them inside ImageViews like so:

    tile.setImageResource(R.drawable.tile_highlight);

I am currently having OutOfMemory problems (`java.lang.OutOfMemoryError: bitmap size exceeds VM budget`)

I've searched and found some other posts, they all suggest that you should recycle the bitmap of an ImageView manually, like so: `((BitmapDrawable)imageView.getDrawable()).getBitmap().recycle();` which will dump it from memory.

BUT in my case, being that i'm not using `setBitmap()` to load the images onto the ImageView objects, when i try and run the above code, it returns `NullPointerException`, more precisely, the method `getBitmap()` returns null, there is no bitmap ?!?!

Do i need to go back in my code and change the way i load all the images in the ImageViews, and then try with the `recycle()` method? Or how can i free up the memory so it doesn't crash anymore?