Error launching Android Studio: Failed to create JVM: error code-6
Asked Answered
B

7

11

I install Android Studio and run normally. But because it was a bit slow so I follow instructions from the website: How can you do when Android Studio was slow and It made me unable to reopen android studio though I have tried to uninstall and reinstall AS well as Java. I use Android studio 2.1, Windows 8.1, core i3, RAM 4 GB.

enter image description here

Blackburn answered 30/6, 2016 at 2:53 Comment(4)
Possible duplicate of Android Studio - No JVM Installation foundProcter
my error has gone, have a look #39616803Trillion
I have also answered on another thread what was working for me.Yuan
if you meets this problem by changing studio64.exe.vmoptions. restore it.Verulamium
B
39

just go this directory:

C:\Users\{pc name}

and delete all folders starting with .AndroidStudio

This solves the issue.

Bunkum answered 22/9, 2016 at 5:20 Comment(4)
I have .AndroidStudio1.5 and .AndroidStudio2.2 which one should we removeTrillion
Can anyone tell me why this happens?Larry
In Android Studio 3 you must remove .AndroidStudio3 folder and problem will solved . thanksMelleta
removing studio64.exe.vmoptions does the work, no need to remove the whole folder. as mentioned by Wasim and Satya AttiliFrustum
C
15

Please cross check VMoptions filestudio64.exe.vmoptions file or delete the studio64.exe.vmoptions from the location C:\Users\pcname.AndroidStudioX.Y

Convergent answered 17/3, 2017 at 13:34 Comment(0)
K
8

If you have updated or created studio64.exe.vmoptions which present at the location {$user}/.AndroidStudio$version. Delete the file

Kyoko answered 17/6, 2017 at 17:9 Comment(1)
For android studio 4.1 path is different: C:\Users\%USER%\AppData\Roaming\Google\AndroidStudio4.1\studio64.exe.vmoptions And yes, that file caused the error on start. Thank you, @WasimBenedicto
D
1

You should:
- Use Windowx x64 (64 bit, because your computer has 4GB RAM).
- Use lastest JDK (1.8 update 92, x64) for Windows
- Important:
Press combination keys: Windows + R or Run utility.
type: systempropertiesadvanced
enter image description here enter image description hereenter image description here enter image description here enter image description here

set environment variable:
JAVA_HOME directory where JDK installed.
add to PATH variable: %JAVA_HOME%\bin

Dominicdominica answered 30/6, 2016 at 2:59 Comment(1)
Not Working these settings had been already done before, the error occured suddenlyTrillion
R
0

Delete this file studio64.exe.vmoptions inside

C:\Users\%USER%\.AndroidStudio{version}\config

Raimund answered 26/3, 2019 at 9:27 Comment(0)
Y
0

I have had set JAVA_HOME variable appropriately but that didn't work for me. The only thing that worked was running studio.bat file inside C:\Program Files\Android\Android Studio\bin. So, you can set shortcut target to point to the studio.bat file.

NOTES:

  • I am using OpenJDK (Installed via AdoptOpenJDK)
  • Android Studio version is 4.1.2
Yuan answered 8/3, 2021 at 15:12 Comment(0)
T
-1

This problem can occur if there is something like a comment in the red box,so you should delete it.

https://static.mcmap.net/file/mcmap/ZG-AbGLDKwfpKnMxcF_AZVLQamyA/64RYL.png

Thumping answered 24/7, 2018 at 4:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.