zoukankan      html  css  js  c++  java
  • Eclipse打包出错——提示GC overhead limit exceeded

    版权声明:本文为博主原创文章,未经博主允许不得转载。

    在Eclipse开发环境中打包发布apk安装包的时候,有时候会出现下面的错误:

    原因

    在打包的时候,Eclipse占用的内存会增大,当分配给Eclipse的运行内存过小的时候,就会出现打包失败的情况。

    解决方案

    加大分配给Eclipse的内存。方法是修改Eclipse安装路径/eclipse.ini文件中的-Xms和-Xmx的值。

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
    -product
    org.eclipse.epp.package.java.product
    --launcher.defaultAction
    openFile
    --launcher.XXMaxPermSize
    256M
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    --launcher.appendVmargs
    -vmargs
    -Dosgi.requiredJavaVersion=1.6
    -Xms40m
    -Xmx512m

     修改后如下:

    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
    -product
    org.eclipse.epp.package.java.product
    --launcher.defaultAction
    openFile
    --launcher.XXMaxPermSize
    256M
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    --launcher.appendVmargs
    -vmargs
    -Dosgi.requiredJavaVersion=1.6
    -Xms512m
    -Xmx1024m

     如果还不行,则可以继续加大内存。

    参考资料

    eclipse打包出错 GC overhead limite execteeded

  • 相关阅读:
    修改VNC的分辨率
    How to use WinSCP with public key authentication
    CentOS-7-x86_64-DVD-1511.iso
    6.828
    Tampermonkey版Vimium
    servlet+jsp完成简单登录
    Servlet知识点小结
    HTTP基础知识点小结
    LeetCode 371两数之和
    LeetCode53 最大子序列问题
  • 原文地址:https://www.cnblogs.com/whycxb/p/7008487.html
Copyright © 2011-2022 走看看