Each time when I start new project in android studio, I have to change the contents of gradle.properties
from org.gradle.jvmargs=-Xmx1536m
to org.gradle.jvmargs=-Xmx1024m
to avoid gradle loading errors and restart the project which takes more time. Is there any way that I can add the default values to this gradle.properties
which will be applied to all the projects I create?
To change the maximum heap size, for Android STudio and not for a single project follow these steps:
-Xmx2g
To confirm your new maximum heap size, open the command line, and type the following command:
jps -lvm
You will see a list of the instrumented JVMs running on your machine, including the full package name for each and the arguments passed in. Locate the item corresponding to your instance of Android Studio. It should end with -Didea.paths.selector=AndroidStudio[Version]. You should see two arguments beginning with -Xmx for this JVM, one with the default value of 1280mb, and one with your new value, as shown in figure
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.