I also had this problem; there really is no solution but to reduce the number / size of bitmaps that you uploaded immediately. Some older Android devices only allocate 16 MB per heap for your entire application, and bitmaps are stored in memory without compression after they are downloaded, so itβs easy to exceed 16 MB with large backgrounds, etc. (854x480, 32-bit 1.6 MB uncompressed bitmap.)
In my game, I managed to get around this only by loading the bitmaps that I was going to use at the current level (for example, I have one Bitmap object for the background, which is reloaded from the resources every time it changes, and not supporting several bitmaps in memory . I just maintain an int that keeps track of which resource I have currently loaded.)
Your sprite sheet is huge, so I think you're right that you need to reduce the size of your animations. Alternatively, loading from resources is pretty fast, so you can get away with doing something like loading an animation strip for the current direction of the symbol and slightly pause it when it rotates, when you replace it with a new animation strip. This can get complicated.
In addition, I highly recommend testing your application on an emulator with a bunch of VMs set to 16 MB to ensure that the problem is fixed for all devices. (The emulator usually has a default value of 24 MB, so itβs easy for it to be unverified and create several 1-star reviews after the release.)
source share