[英]Error launching Android Studio: Failed to create JVM: error code-6
I install Android Studio and run normally.我安装了 Android Studio 并正常运行。 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.
但是因为它有点慢,所以我按照网站上的说明进行操作:当 Android Studio 运行缓慢时,您怎么办,这使我无法重新打开 android studio,尽管我已尝试卸载并重新安装 AS 和 Java。 I use Android studio 2.1, Windows 8.1, core i3, RAM 4 GB.
我使用 Android studio 2.1、Windows 8.1、core i3、RAM 4 GB。
just go this directory:就去这个目录:
C:\\Users\\{pc name} C:\\用户\\{电脑名称}
and delete all folders starting with .AndroidStudio并删除所有以 .AndroidStudio 开头的文件夹
This solves the issue.这解决了这个问题。
请交叉检查 VMoptions filestudio64.exe.vmoptions文件或从位置 C:\\Users\\pcname.AndroidStudioX.Y 删除 studio64.exe.vmoptions
If you have updated or created studio64.exe.vmoptions which present at the location {$user}/.AndroidStudio$version.如果您更新或创建了位于 {$user}/.AndroidStudio$version 的studio64.exe.vmoptions 。 Delete the file
删除文件
You should:你应该:
- Use Windowx x64 (64 bit, because your computer has 4GB RAM). - 使用 Windowx x64(64 位,因为您的计算机有 4GB 内存)。
- Use lastest JDK (1.8 update 92, x64) for Windows - 为 Windows 使用最新的 JDK(1.8 更新 92,x64)
- Important: -重要:
Press combination keys: Windows + R or Run utility.按组合键: Windows + R或运行实用程序。
type: systempropertiesadvanced
类型:系统
systempropertiesadvanced
set environment variable:设置环境变量:
JAVA_HOME
directory where JDK installed. JAVA_HOME
JDK 安装目录。
add to PATH
variable: %JAVA_HOME%\\bin
添加到
PATH
变量: %JAVA_HOME%\\bin
删除studio64.exe.vmoptions里面的这个文件
C:\\Users\\%USER%\\.AndroidStudio{version}\\config
I have had set JAVA_HOME variable appropriately but that didn't work for me.我已经适当地设置了 JAVA_HOME 变量,但这对我不起作用。 The only thing that worked was running
studio.bat
file inside C:\\Program Files\\Android\\Android Studio\\bin
.唯一有效的是在
C:\\Program Files\\Android\\Android Studio\\bin
运行studio.bat
文件。 So, you can set shortcut target to point to the studio.bat file.因此,您可以将快捷方式目标设置为指向 studio.bat 文件。
NOTES:注意事项:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.