Android studio,无效的最大堆大小

时间:2015-06-29 10:26:27

标签: android-studio jvm heap-size

明确项目并建立成功后。 我在Android工作室运行Android项目,它出现了错误,谁能给我解决方案解决问题,谢谢!:

> com.android.ide.common.internal.LoggedErrorException: Failed to run command:....
Error Code:
    1
Output:
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    Invalid maximum heap size: -Xmx4g
    The specified size exceeds the maximum representable size.


Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    Invalid maximum heap size: -Xmx4g

我的android studio config(studio.exe.vmoptions):

-server
-Xms512m
-Xmx1024m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=150m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Djna.nosys=true
-Djna.boot.library.path=

-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Didea.paths.selector=AndroidStudio1.2
-Didea.platform.prefix=AndroidStudio

1 个答案:

答案 0 :(得分:4)

这是项目“build.gradle”文件中的配置选项。寻找这样的东西:

 declare 
    l_Admin varchar2(100);
    l_approved_ain abc.approved_ain;

    begin
l_approved_ain(1) :=123;
l_approved_ain(2) :=4645;
    abc(l_Admin ,l_approved_ain);
    commit;

    end;