【发布时间】:2018-11-10 11:15:32
【问题描述】:
我制作了一个在咖啡机上运行的应用程序。
20 多天后(可能是 60 多天,具体取决于使用情况)
发生 OutOfMemoryError:
java.lang.OutOfMemoryError: Failed to allocate a 604 byte allocation with 16777216 free bytes and 319MB until OOM; failed due to fragmentation (required continguous free 65536 bytes for a new buffer where largest contiguous free 53248 bytes)
我的问题是:
有没有办法以编程方式对内存 android 应用程序运行碎片整理?
所需的时间应该不是问题,因为机器会进入待机或生态模式。
我看到的是有足够的可用内存。
【问题讨论】:
-
你读过this answer吗?如果这没有帮助,您将需要提供有关您的应用程序功能的更多信息,然后才能帮助您。没有通用的这是您在应用程序上解决此问题的方法,您什么都没告诉我们答案。见How to Ask 和minimal reproducible example。
标签: android memory out-of-memory fragmentation