Android Studio - 找不到 JVM 安装

2022-01-16 00:00:00 jvm android android-studio java

我在尝试启动 Android Studio

当我在安装后尝试启动它时出现此错误:

When I try to launch it after installation I'm getting this error:

未找到 JVM 安装.请安装 64 位 JDK.

我目前的系统规格:

操作系统:Windows 8.0 64 位版本
已安装 JDK:JDK 1.8.0

我尝试过的:

我已经尝试了错误中报告的内容,以及在大多数解决方案中将环境变量中的 JDK_HOME 变量设置为我的 JDK 路径(64 位版本)即 C:Program FilesJavajdk1.8.0_05

I have tried what was reported in the error, and also in most of the solutions to set the JDK_HOME variable in environment variables to my JDK path (64 bit version) i.e. C:Program FilesJavajdk1.8.0_05

*我也试过重启系统,以防万一测试环境变量是否在不重启的情况下不起作用

我已经看到并尝试了这些解决方案,但它们都不起作用,所以不要将其标记为与其中任何一个重复:
​​Android Studio 在 Windows 7 上安装失败,未找到 JDK
用android studio no jvm found, JAVA_HOME 已经设置
Android Studio 在 Windows 8 64bit 上启动失败
Android Studio 安装后无法启动

I have seen these solutions and tried but none of them works, so don't mark it as a duplicate of any of these:
Android Studio installation on Windows 7 fails, no JDK found
With android studio no jvm found, JAVA_HOME has been set
Android Studio start fails on Windows 8 64bit
Android Studio does not launch after installation

这里是java版本的cmd输出:

Here is the cmd output for java version:

推荐答案

我也遇到了同样的问题.我尝试设置各种路径,但没有任何效果.所以我不得不做一些肮脏的修复.唯一的问题是它会打开一个空白的命令行窗口.

I had the same problem. I tried setting all kind of paths but nothing worked. So I had to do some dirty fix. The only problem with this is that it opens a blank command line window.

我做了以下工作.

  • 转到 AndroidStudio 安装文件夹.
  • 转到 bin 文件夹并在文本编辑器中打开 studio.bat
  • 在 ECHO 行之后添加 set JAVA_HOME=C:Program FilesJava2jdk1.8.0//你的 java 路径.
  • 转到 开始 -> 所有程序 -> Android Studio ->
  • 右击Android Studio并点击properties.
  • 您将看到 Target 类似于 <安装路径>android-studioinstudio64.exe
  • 改成<安装路径>android-studioinstudio.bat
  • goto the AndroidStudio installation folder.
  • goto bin folder and open studio.bat in text editor
  • add set JAVA_HOME=C:Program FilesJava2jdk1.8.0//your java path after the ECHO line.
  • goto Start -> All Programmes -> Android Studio ->
  • right click on Android Studio and click on properties.
  • You will see the Target something like <installation path>android-studioinstudio64.exe
  • change it to <installation path>android-studioinstudio.bat

现在您可以通过从菜单中单击它来访问它.

Now you can access it by clicking it from the menu.

注意:我用 8 试了一下,效果很好.

Note : I tried it with 8, It works.

相关文章