It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

You have 2 previously asked questions with a possibility of a correct answer, please go back and choose a correct answer. + try to post better questions by adding some code in your questions so people can have a better idea of your problems.
–
raym0ndJan 20 '12 at 16:01

are you running this app on the emulator? How many images are you loading? And in which resolution?
–
StErMiJan 20 '12 at 16:21

I load image in a gallery and in a gridview.I test my application in emulator and in real device but I have the same problem.
–
lady androidJan 20 '12 at 16:28

2 Answers
2

Each pixel of an image can require up to 4 bytes of memory. So an image that is 1024x768 requires 3 MB of memory. Chances are you are actually loading an image that is much larger than this and therefor is consuming all of your memory. You need to downsample the image. See the second part my answer on this question for an explanation on how to do this.

I won't downvote you, but this is the wrong solution. If you're getting OOM errors, unless you're doing heavy image editing or need lots of large images, its probably because of a memory leak. Increasing the amount of memory might slightly increase the amount of time it takes for the app to crash, but it won't stop it from crashing.
–
samajuddJan 20 '12 at 18:16