Android Studio 出现 Failed to create JVM

failed to create JVM: JVM path: "C:\Program Files\XXXXXX\XXXX\xxxxx\"
    if you have a 64-bit jdk installed, define a JAVA_HOME variable in Computer> system variables> system settings> environment variables.

打开 Android Studio 就报以上错误!

说说我遇到的 情况,看上去是  初始化 JVM 失败了。

https://stackoverflow.com/questions/45846624/intellij-idea-failed-to-create-jvm-error-code-1

这里说是  要删掉  JetBrains 文件夹下 的 vm options 文件, 现在 这个文件在 google 文件夹下

完整路径在 : C:\Users\{username}\AppData\Roaming\Google\你的Android Studio 版本\studio64.exe.vmoptions

我的是:         C:\Users\{username}\AppData\Roaming\Google\AndroidStudio2021.2\studio64.exe.vmoptions。

Android Studio 是基于IntelliJIdea 的,所以在 IntelliJIdea 系列的 都差不多,只是路径有差异,可能是

 C:\Users\{username}\AppData\Roaming\JetBrains\IntelliJIdea2020.3\idea64.exe vmoptions

 

报错原因就是这里面的内容有问题,仔细检查格式就好了。 实在不行 先删掉  然后一项一项重新添加配置

 

posted @ 2022-10-13 10:19  lesten  阅读(1652)  评论(0)    收藏  举报