I made an application for Android and and I'm trying to make it work on every possible device.
For this, I created different layouts (small, normal, large, xlarge) with different densities (ldpi, mdpi, hdpi, xhdpi), but when I load the emulator with the range of layout-normal-xhdpi
, the application doesn't start and make an exit exception (force close). For all other layouts, it works perfectly.
What should it be?
I'm using minSDK = "8"
, but I tried also with higher APIs and still not working. I also tested with the APIS below level 4 and it works perfectly (the problem of these APIs don't support all resolutions).
Here are some select lines from your log that tell you what's going on:
09-05 15:10:34.941: E/dalvikvm-heap(453): 9523200-byte external allocation too large for this process.
and:
09-05 15:10:35.112: E/AndroidRuntime(453): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Your bitmaps are extremely large (one in particular is ~9MB) and you are running out of memory. Use some smaller bitmaps.