电脑上装有java7,但是JAVA_HOME设的是java8, 但是Android Studio安装后却不能识别,报以下错误:
Failed to create JVM: error code -4.
JVM Path: C:\Program Files (x86)\Java\jdk1.7.0_71\jre
If you already have a 32-bit JDK installed, define a JAVA_HOME variable in
Computer > System Properties > System Settings > Environment Variables.
NOTE: Do not choose a Java “JRE”. You need to point to a full JDK,
otherwise the IDE may fail to start.
试验了一下到Android Studio的安装目录下找bin目录,然后将其中的 studio.exe 和 studio.vmoptions 删除掉就可以了,当然我的是64位 win10,如果是32位系统的话应该是删除 studio64.exe 。