failed to create jvm error code 4 android studio

后端 未结 8 2463
情话喂你
情话喂你 2020-12-03 07:09

I was just updated my last Android Studio and got this error:

failed to create jvm error code -4 JVM Path: C:\\Program Files\\Java\\jdk1.7.0_45\\jre

相关标签:
8条回答
  • 2020-12-03 07:38

    All I had to do was run android studio as an administrator. Just right click on the icon on your desktop (do not try to do it with a shortcut pinned to your taskbar) and click run as administrator.

    0 讨论(0)
  • 2020-12-03 07:40

    just updating my JDK worked for me! :D If it still doesn't work, try updating Android Studio.

    0 讨论(0)
  • 2020-12-03 07:50

    I have rechecked the java path but its not working in my case. So I deleted the Android Studio settings folder in my user folder.

    C:\Users\my_username.AndroidStudio
    

    Then re-open Android Studio then everything work fine for me.

    In some case is in C:/Users/my_username/.AndroidStudio3.0/studio64.vmoptions.

    0 讨论(0)
  • 2020-12-03 07:50

    Go to

    C:\Program Files\Android\Android Studio\bin\studio64.exe.vmoptions

    Delete studio64.exe.vmoptions file

    That's what worked for me

    0 讨论(0)
  • 2020-12-03 07:51

    Go to C:\Program Files\Android\Android Studio\bin\studio.exe.vmoptions

    Open it with notepad. some times it will not be editable so give administrative permission and change the following attributes:

    -Xmx512m to -Xmx256m

    -XX:MaxPermSize=250m to -XX:MaxPermSize=128m

    Or change:

    -Xmx750m to -Xmx512m

    -XX:MaxPermSize=350m to -XX:MaxPermSize=250m

    0 讨论(0)
  • 2020-12-03 07:52

    For Android Studio 4+ You need to remove «\studio.exe.vmoptions» or «studio64.exe.vmoptions» Here is the path

    C:\Users\%USERNAME%\AppData\Roaming\Google\{studio version} 
    
    0 讨论(0)
提交回复
热议问题