Getting Out of memory error in android Maps sometimes

In my app there is a main screen in which there is a mapview(more like a static image), on click of which it opens a screen which has a supportmapfragment with additional tile layers. This works fine on most of the devices, but only on some devices if I do navigate between the main screen and maps screen multiple times then I am getting out of memory exception. Any suggestions for this?

Logs :

W/Adreno-GSL(30734): <sharedmem_gpuobj_alloc:2461>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
E/Adreno-GSL(30734): <gsl_memory_alloc_pure:2236>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.

1 answer

  • answered 2020-02-13 07:41 Apps Maven

    Add these two lines in your manifest file