【发布时间】:2014-11-27 06:34:56
【问题描述】:
我在 64 位 Linux 上使用 android studio 1.0 RC。
当我运行我的应用程序时,我得到了
"java.lang.OutOfMemoryError: GC overhead limit exceeded"
当我搜索如何解决这个错误时,我得到了像添加这样的解决方案:
- -XX:-UseGCOverheadLimit to studio.vmoptions 或 studio64.vmoptions
- -Xmx2000m 到 studio.vmoptions 或 studio64.vmoptions 等。
这些对我不起作用。
请帮忙。提前致谢
【问题讨论】:
-
我通过在 build.gradle 文件的 android 闭包中添加 dexOptions { incremental true javaMaxHeapSize "4g" } 解决了这个问题。在groups.google.com/forum/#!topic/adt-dev/r4p-sBLl7DQ 中找到了这个答案
-
这可能是由于 IDE 插件,或者可能是 gradle 任务中的某些东西。我在使用旧版本的 CodeGlance(现已修复)时遇到了这个问题
标签: android garbage-collection out-of-memory