I've just updated Android Studio and I can't sync my project anymore.
Go to your Android Studio Folder Where it is installed. There is File stduio.exe.vmoptions and studio64.exe.vmoptions, open it in notepad.
According to error you may need to change 2 values in it -
-Xms512m
-Xmx1280m
It should work. If it still does not work out try increasing the size.
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 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
According to error you may need to change two values in it.
-Xms512m
-Xmx1280m
check this value and change it.
3 Way to solves :
1.Close all your browsers and other tools and then syn gradle again.
2.Go to file > close project and then go to configure>settings>compiler In compiler set 1024 in Build process heap size (Mbytes) :
3.Open gradle.property file in Gradle Scripts drop down list and copy past this line :
org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m
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.