-1

Apparently my app needs 2.5 MB (maybe because my photos need 2MB...) and then virtual device can't work with that much MB.

How can I make my virtual device support more than 2.5 MB to get my application working?

Manoj Govindan
  • 72,339
  • 21
  • 134
  • 141
Paul
  • 1
  • 1
  • 5

1 Answers1

1

I am going to deduce from your previous question that you are referring to this error message:

E/dalvikvm-heap( 248): 2621440-byte external allocation too large for this process.

I would suggest Googling that phrase and looking at solutions to the problem which apparently can be summarised as:

  • Use smaller images that are suitable for the size of an Android device
  • Resample your images
Community
  • 1
  • 1
Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
  • then why other applications of the market haves more than 2.5MB ? – Paul Sep 30 '10 at 21:49
  • Other applications on the Market presumably don't attempt to allocate more than 2.5MB to an individual `Bitmap`. Don't do that (i.e. read the above) and see what happens. Also, you can always check other open source applications to see what they do, like the Android photo gallery app. – Christopher Orr Sep 30 '10 at 22:05
  • no no, my bitmaps only have 300kb each, 2.5mb is all the application – Paul Sep 30 '10 at 23:24
  • The size of your APK is irrelevant. The error message and links I provided suggest that you're using up more than 2.5MB of memory when decoding an image file into a `Bitmap`, by allocating too many bits-per-pixel or something similar. The compressed image size (300kB) isn't necessarily the same as the uncompressed bitmaps size. – Christopher Orr Oct 01 '10 at 12:43
  • any idea of max resolution in a android image? – Paul Oct 01 '10 at 19:01