Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

improperly specified vm option when launching android studio

Tags:

java

android

enter image description here

to speed up android studio i changed some setting which i seen in stackoverflow . i changed Help> Edit Custom VM Options to

-Xms1024m 
-Xmx4096m 
-XX:MaxPermSize=1024m 
-XX:ReservedCodeCacheSize=440m 
-XX:+UseCompressedOops 
-XX:-HeapDumpOnOutOfMemoryError 
-Dfile.encoding=UTF-8

after that, when i laucnhing android studio showing this message ....

what i tried....

  1. reinstlled android studio and java
  2. when i check stackoverflow they saying to delete ~/.AndroidStudoio3.1/config/studio64.vmoptionsbut there no file like that in my directory.... is there any other solutions? please help me....Thanks in advance ...
like image 634
HabeebAdhru Avatar asked Oct 18 '25 03:10

HabeebAdhru


1 Answers

I had this exact same problem and navigated to your question in an attempt to find the answer.

You are indeed right that you need to delete ~/.AndroidStudoio3.1/config/studio64.vmoptions. Android Studio stores a config to your user profile which is why the problem persisted after you uninstalled the program file itself. You can find the file you're looking for under C:\Users\YourUserName\AppData\Roaming\Google\AndroidStudio4.1. Delete studios64.vmoptions and you should be able to launch Android Studio. If you're still trying to optimize your workspace you could try:

-Xms1024m
-Xmx4096m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=256m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djna.nosys=true
-Djna.boot.library.path=

-Djna.debug_load=true
-Djna.debug_load.jna=true
-Djsse.enableSNIExtension=false
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-Didea.platform.prefix=AndroidStudio
-Didea.paths.selector=AndroidStudio

sources: https://developer.android.com/studio/intro/studio-config https://riptutorial.com/android-studio/example/11146/customize-the-vm-option

like image 177
jobbylobby Avatar answered Oct 20 '25 16:10

jobbylobby



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!