MapFragment Google Maps API v2 Out of Memory Error / Memory Leak

后端 未结 2 1474
-上瘾入骨i
-上瘾入骨i 2021-01-03 04:09

I\'ve read a number of similar posts over the past few days, but none that specifically answer this problem. I start getting an OOM issue after ~2 minutes of aggressive map

相关标签:
2条回答
  • 2021-01-03 04:21

    I ran into this problem trying to run an app on demo mode for a few hours at a time. No matter what I tried, after 30 minutes, I would see this crash without a readable stack report.

    I tried many different things but this was the only thing that worked for me. It's not a fix for the map bug, but it kept my app from crashing:

        <application
        ...
        android:largeHeap="true">
    
    0 讨论(0)
  • 2021-01-03 04:22

    try call map onPause, onResume, onLowMemory in corresponding Fragment methods.

    0 讨论(0)
提交回复
热议问题