有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

出现安卓 Java堆空间错误

我的系统中出现Java堆空间错误。我从堆栈溢出中尝试了很多解决方案,但没有任何效果。当我工作的时候

enter image description here

然后按OK时 enter image description here

enter image description here

(我的项目中没有错误)

我的日食。ini是:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
com.安卓.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.安卓.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M

我的内存:4GB 请帮我解决这个问题


共 (3) 个答案

  1. # 1 楼答案

    您可以在控制面板中增加jvm内存。您有4GB的内存是可以的,但是您为jvm分配了多少内存是很重要的,请让我知道任何进一步的说明

  2. # 2 楼答案

    这是因为Eclipse内存不足。您可以通过编辑(或创建)eclipse.ini文件(在eclipse目录的根目录上)并放入以下代码来增加分配的内存:

    -vmargs
    -Xms512m (for 512 Mb)
    -Xmx1024m (for 1024 Mb)
    

    有关可用选项的完整列表,please check this link

  3. # 3 楼答案

    日食中的变化。伊尼

     -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
     launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
    -product
    com.android.ide.eclipse.adt.package.product
     launcher.XXMaxPermSize
    256M
    -showsplash
    com.android.ide.eclipse.adt.package.product
     launcher.XXMaxPermSize
    256m
     launcher.defaultAction
    openFile
    -vmargs
    -Xms512m
    -Xmx512m
    -Dosgi.requiredJavaVersion=1.6
    -Declipse.buildId=v22.3.0-887826
    -XX:MaxPermSize=512M