Android SDK 不认为安装了 JDK?- Windows 7的

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5413691/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 16:29:39  来源:igfitidea点击:

Android SDK deosn't think JDK is installed? - Windows 7

androidwindowssdkjava

提问by Ian Vink

On Windows 7 I have installed the Java SE JDK, then rebooted. enter image description here

在 Windows 7 上,我安装了 Java SE JDK,然后重新启动。 在此处输入图片说明

When I then run the Android SDK installer, there is a warning that the JDK is not installed.

然后,当我运行 Android SDK 安装程序时,会出现未安装 JDK 的警告。

enter image description here

在此处输入图片说明

回答by Dominic Tancredi

Did you install 32-bit version or 64-bit version?

你安装的是 32 位版本还是 64 位版本?

Check out here for Windows 7 / Android Tools setup :

在此处查看 Windows 7 / Android 工具设置:

https://stackoverflow.com/questions/4588548/help-jdk-not-detected-problem-during-android-sdk-tools-setup

https://stackoverflow.com/questions/4588548/help-jdk-not-detected-problem-during-android-sdk-tools-setup

Also, check out your PATH environment variables to confirm JDK is setup and referenced!

另外,请检查您的 PATH 环境变量以确认 JDK 已设置和引用!

And as commented below, also check out JAVA_HOME variable.

正如下面评论的那样,还要检查 JAVA_HOME 变量。

回答by Ian Vink

I found that if I press the Back button on the Android SDK installer, then press the Next button again, it works!

我发现如果我按下 Android SDK 安装程序上的后退按钮,然后再次按下下一步按钮,它就可以工作了!

回答by Ankit Saxena

i had the same problem, tried all the solutions but nothing worked. The problem is with Windows 7 installed is 64 bit and all the softwares that you are installing should be 32 bit. Android SDK itself is 32 bit and it identifies only 32 bit JDK. So install following softwares.

我遇到了同样的问题,尝试了所有解决方案,但没有任何效果。问题在于安装的 Windows 7 是 64 位,而您安装的所有软件都应该是 32 位。Android SDK 本身是 32 位的,它只识别 32 位的 JDK。所以安装以下软件。

  1. JDK (32 bit)
  2. Android SDK (while installing SDK, make sure install it in directory other than "C:\Program Files (x86)", more probably in other drive or in the directory where Eclipse is extracted)
  3. Eclipse (32 bit) and finally ADT.
  1. JDK(32 位)
  2. Android SDK(安装SDK时,请确保将其安装在“C:\Program Files (x86)”以外的目录中,更有可能在其他驱动器或Eclipse解压目录中)
  3. Eclipse(32 位),最后是 ADT。

i tried it and all works fine.

我试过了,一切正常。

回答by Alireza A.Masrurkhah

You Should Create an Environment Variable to Point to Your java Directory. Go to My Computer > right click on a free space > choose properties > in the left column choose "Advance System Setting" > Go to Advance tab > push Environment variable button > in System Variable click on New :

您应该创建一个环境变量来指向您的 java 目录。转到我的电脑>右键单击可用空间>选择属性>在左栏中选择“高级系统设置”>转到高级选项卡>按下环境变量按钮>在系统变量中单击新建:

Variable name : JAVA_HOME Variable value: C:\Program Files\Java\jdk1.7.0_06

变量名称:JAVA_HOME 变量值:C:\Program Files\Java\jdk1.7.0_06

You should be careful about path if you add path like this "C:\Program Files\Java\jdk1.7.0_06\bin" or this one "C:\Program Files\Java" it will not work.

如果你添加这样的路径“C:\Program Files\Java\jdk1.7.0_06\bin”或这个“C:\Program Files\Java”,你应该小心路径它不会工作。

回答by Alireza A.Masrurkhah

My is configuration Windows 7 64-bit.

我的是配置 Windows 7 64 位。

I didn't want to uninstall 64-bit jdk and the other suggestions weren't working. So I just downloaded the 32-bit and re-ran the windows installer.

我不想卸载 64 位 jdk 并且其他建议不起作用。所以我只是下载了 32 位并重新运行了 Windows 安装程序。

Voila, it works and doesn't take the 32-bit either. It takes the 64-bit higher version instead.

瞧,它可以工作,也不需要 32 位。它需要 64 位更高版本。

I feel it just feels safe with the presence of the 32-bit jdk :P

我觉得 32 位 jdk 的存在感觉很安全:P

回答by PsyChip

When you downloaded sdk, running via browser's downloaded files section right? application can't detect java in this state. if you run it via directly its own folder, it will find sdk. simple

当您下载 sdk 时,通过浏览器的下载文件部分运行对吗?应用程序无法在此状态下检测到 java。如果你直接通过它自己的文件夹运行它,它会找到 sdk。简单的