Android Studio 1.3.1 中的 Java 堆大小错误

Android Studio 1.3.1 中的 Java 堆大小错误

问题描述:

我最近将 Android Studio 从 1.2 更新到 1.3.1.更新 Gradle 同步失败消息后开始显示以增加 Java 堆大小.

I recently updated Android Studio from 1.2 to 1.3.1. After updating Gradle Sync failed message is started showing up to increase Java heap size.

以下是错误截图.

TIA

转到安装它的 Android Studio 文件夹.有文件stduio.exestudio64.exe,文件类型为VMOPTIONS,用记事本打开你会看到这样的:>

Go to your Android Studio Folder Where it is installed. There is File stduio.exe and studio64.exe with file type of VMOPTIONS, open it in notepad you will see Something like this:

-Xms512m
-Xmx1280m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=225m
-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.3
-Didea.platform.prefix=AndroidStudio

根据错误,您可能需要更改其中的 2 个值.

According to error you may need to change 2 values in it.

-Xms512m
-Xmx1280m

检查此值并更改它.