无法启动Android Studio;创建JVM失败:错误代码-1 [英] Failure to launch Android Studio; Failed to create JVM: error code -1
问题描述
当尝试在Windows上启动Android Studio时,出现以下错误:
When trying to launch Android Studio on Windows I get the following error:
无法创建JVM:错误代码-1 JVM路径:C:\ Program Files \ Java \ jdk1.8.0_91 \ jre
Failed to create JVM: error code -1 JVM Path: C:\Program Files\Java\jdk1.8.0_91\jre
我尝试设置JAVA_PATH变量,还尝试卸载Android Studio和Java,然后重新安装.我在尝试弄乱路径变量以使用外部Java库时遇到了此错误.
I have tried setting the JAVA_PATH variable and I have also tried uninstalling Android Studio and Java and then reinstalling. I came to this error while trying to mess with the path variables to use an external Java library.
是否有解决此问题的建议?
Any suggestions on fixing this problem?
在我的情况下,我下面给出的解决方案似乎适用于错误代码-1和-4.唯一的问题是,如果使用给定的解决方案,则会丢失用户设置.
The solution I gave below seems to work for error code -1 and -4 in my case. The only issue is that you lose your user settings if you use the solution given.
推荐答案
问题已解决! 该线程非常有用:
Problem solved! This thread was extremely helpful:
最终对我有用的是删除我的用户文件夹中的Android Studio设置文件夹.
What ended up working for me was deleting the Android Studio setting folder in my user folder.
C:\ Users \ my_username.AndroidStudio
C:\Users\my_username.AndroidStudio
然后重新打开Android Studio,然后一切正常.
Then re-open Android Studio then everything work fine for me.
这篇关于无法启动Android Studio;创建JVM失败:错误代码-1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!