有时在Android Maps中出现内存不足错误

问题描述 投票:0回答:1

在我的应用程序中,有一个主屏幕,其中有一个mapview(更像是静态图像),单击它会打开一个屏幕,其中包含带有附加图块图层的supportmapfragment。这在大多数设备上都可以正常运行,但是仅在某些设备上,如果我多次在主屏幕和地图屏幕之间导航,那么我将出现内存不足的异常。有什么建议吗?

日志:

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.
android android-maps-v2
1个回答
0
投票

将这两行添加到清单文件中

android:largeHeap="true"
android:hardwareAccelerated="false"
© www.soinside.com 2019 - 2024. All rights reserved.