如何解决java.lang.OutOfMemoryError:GC开销限制在机器人工作室超过误差误差、开销、如何解决、机器人

2023-09-05 06:01:07 作者:清新优雅的:半城烟雨〞半城雾

我使用 Android的工作室1.0 RC 64位Linux操作系统。

I am using android studio 1.0 RC for 64 bit linux.

当我运行我的应用我收到

When I run my application I am getting

"java.lang.OutOfMemoryError: GC overhead limit exceeded"

当我搜索如何解决这个错误我得到了像加解决方案:

When I searched on how to solve this error I got solutions like add:

-XX:-UseGCOverheadLimit到studio.vmoptions或studio64.vmoptions -Xmx2000m以studio.vmoptions或studio64.vmoptions等。

这些对我来说没有工作。

These did not work for me.

请帮忙。在此先感谢

推荐答案

我加入解决了这个问题。

I solved this issue by adding

dexOptions { 
          incremental true 
          javaMaxHeapSize "4g" 
} 

在build.gradle文件中的机器人关闭。 在找到这个答案

to the android closure in build.gradle file. Found this answer in

的OutOfMemoryError:超出GC开销额度

 
精彩推荐
图片推荐