Java Android SDK安装找不到JDK

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4382178/
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-08-14 16:45:31  来源:igfitidea点击:

Android SDK installation doesn't find JDK

javaandroidsdkwindows-7-x64jdk6

提问by Simon

I'm trying to install the Android SDK on my Windows 7 x64 System.

我正在尝试在我的 Windows 7 x64 系统上安装 Android SDK。

jdk-6u23-windows-x64.exeis installed, but the Android SDKsetup refuses to proceed because it doesn't find the JDKinstallation.

jdk-6u23-windows-x64.exe已安装,但Android SDK安装程序拒绝继续,因为它没有找到JDK安装。

Is this a known issue? And is there a solution?

这是一个已知的问题?有解决办法吗?

SDK Error

SDK错误

回答by Simon

It seems like it doesn't work without 32 bit JDK. Just install it and be happy...

如果没有 32 位 JDK,它似乎不起作用。只需安装它并快乐......

回答by Nick

Try downloading and installing the zipped version rather than the .exe installer.

尝试下载并安装压缩版本而不是 .exe 安装程序。

回答by gabrio

I downloaded the .zip archive instead and ran SDK Manager.exe, and it worked like a charm. You had the same issue with the .exe otherwise.

我下载了 .zip 档案并运行了SDK Manager.exe,它就像一个魅力。否则,您对 .exe 也有同样的问题。

回答by SNK

I had the same problem and solved it by installing the x86 version of the JDK (on Windows XP x64).

我遇到了同样的问题,并通过安装 x86 版本的 JDK(在 Windows XP x64 上)解决了这个问题。

回答by Neb

You will have to download the 32-bit SDK version because Win7 64-bit is not supported only Windows Server 2003 has a supported 64-bit version. During the download of Java SDK pick "Windows" as your platform and not "Windowsx64".
Once I did this android SDK installed like a charm. Hope this helps.

您必须下载 32 位 SDK 版本,因为不支持 64 位 Win7,只有 Windows Server 2003 支持 64 位版本。在下载 Java SDK 期间,选择“Windows”作为您的平台,而不是“Windowsx64”。
一旦我安装了这个 android SDK,就像一个魅力。希望这可以帮助。

回答by Kent

This registry fix worked like a charm on my Windows 7 x64 setup: http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/

这个注册表修复在我的 Windows 7 x64 设置中就像一个魅力:http: //codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/

回答by dokd

Yeah install the 32 bit version of the Java SE SDK (or any of the combinations). That should help solve your problem.

是的,安装 32 位版本的 Java SE SDK(或任何组合)。这应该有助于解决您的问题。

回答by Justin Buser

All you need are the following two registry entries. It appears as if whoever posted the other registry stuff basically just copied all the keys from HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoftinto HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft, which obviously isn't an ideal solution because most of the keys aren't needed.

您只需要以下两个注册表项。看起来好像发布其他注册表内容的人基本上只是将所有密钥从HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoftinto复制了HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft,这显然不是理想的解决方案,因为大多数密钥都不需要。

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit]
"CurrentVersion"="1.6"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit.6]
"JavaHome"="C:\Program Files\Java\jdk1.6.0_23"

回答by Jurgen

Press Backwhen you get the notification and then Next. This time it will find the JDK.

收到通知后按Back,然后按Next。这次它会找到JDK.

回答by Michael Rut

I found the solution and it's beautifully stupid. I found Android SDK cannot detect JDK.

我找到了解决方案,它非常愚蠢。我发现Android SDK 无法检测到 JDK

Press the Backbutton on the SDK error screen that tells you that the EXE couldn't detect the JDK. Then press Next.

在 SDK 错误屏幕上按后退按钮,告诉您 EXE 无法检测到 JDK。然后按下一步

Who would have thought that would happen?

谁会想到会发生这种情况?