1

i set -XmxheapSize:-Xmx2g in Custom VM Options and run jps -lvm in console after this android studio not lunch and error

failed to create jvm:error code -6 android studio

i restart pc and re-install android studio but not working!!!

please hlep

my system operation windows 10 64-bit

Ali Naeimi
  • 612
  • 8
  • 16

3 Answers3

1

This is indeed a corrupt custom vmoptions file
To fix, edit the file, which for me was here:

C:\Users\<WindowsUser>\.AndroidStudio2.3\studio64.exe.vmoptions

Ensure options are specified one on each line.
e.g.

# custom Android Studio VM options, see http://tools.android.com/tech-docs/configuration
-Xms750m
-Xmx750m

Save the file and rerun Android Studio.

davidfrancis
  • 3,734
  • 2
  • 24
  • 21
0

have you checked jvm.dll in

C:\Program Files\Java\jdk1.8.0_45\jre\bin\client? To me, I found it at C:\Program Files\Java\jdk1.8.0_45\jre\bin\server

Nitin Singh
  • 145
  • 6
  • i found this directory: C:\Program Files\Java\jdk1.8.0_101\jre\bin\server – Ali Naeimi Sep 21 '16 at 12:48
  • is there jvm.dll present in it? – Nitin Singh Sep 21 '16 at 12:53
  • i set -XmxheapSize:-Xmx2g and run jps -lvm in console after this not working android studio – Ali Naeimi Sep 21 '16 at 13:04
  • The JAVA_HOME should contain the path of the 64-bit JDK. C:\Program Files (x86)\Java\jre1.8.0_31 is the path of a JRE. Normally the JDK directory should be something like jdk1.8.0_31 in your case, and the JAVA_HOME would store the absolute path of this directory, without the bin directory. Try searching for that directory under C:/Program Files (C:/Program Files(x86) is usually for 32-bit installations). – Nitin Singh Dec 06 '16 at 09:53
0

How I have solved the error. Frst I played so many times with JAVA_HOME and Path sections doesnt work at all. Then Removed the Android Studio so reinstalled not worked again. Also I have played with the values of C:\Program Files\Android\Android Studio\bin studio.exe.vmoptions not worked again. Last thing that I done is the picture below; I removed the .AndroidStuido1.5 (3gb)not worked again finnaly I removed .AndroidStuido2.2 and started A.S again it worked. I am not sure what caused the error maybe there is some kind of capacity that I have reached by creating so many project, dont know. By the way I returned to jdk1.7. It was jdk1.8 before actualy I recomend to remove the .AndroidStuido(version) first. Hope it will help others I spent so many hours.

enter image description here

Samir
  • 6,405
  • 5
  • 39
  • 42