Android SDK安装找不到JDK

发布于 2024-10-06 16:32:49 字数 261 浏览 0 评论 0原文

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

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

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

SDK 错误

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

jdk-6u23-windows-x64.exe is installed, but the Android SDK setup refuses to proceed because it doesn't find the JDK installation.

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

SDK Error

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(30

只怪假的太真实 2024-10-13 16:32:50

收到通知后按返回,然后按下一步。这次它将找到JDK

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

〆凄凉。 2024-10-13 16:32:50

实际设置:

  • 操作系统:Windows 8.1
  • JDK 文件:jdk-8u11-windows-x64.exe
  • ADT 文件:installer_r23.0.2-windows.exe

安装 x64 JDK,并首先尝试 back-next 选项,然后尝试按照错误消息所述设置 JAVA_HOME,但如果这对您也不起作用,然后试试这个:

按照它说的那样,在环境变量中设置JAVA_HOME,但在路径中使用正斜杠而不是反斜杠。

严重地。

对我来说,当 JAVA_HOMEC:\Program Files\Java\jdk1.6.0_31 时失败,但当它为 C:/Program Files/Java/ 时工作正常jdk1.6.0_31 - 让我发疯!

如果这还不够,还要添加到环境变量 Path 的开头 %JAVA_HOME%;

系统环境变量中的更新值:

  • JAVA_HOME=C:/Program文件/Java/jdk1.8.0_11
  • JRE_HOME=C:/Program Files/Java/jre8
  • Path=%JAVA_HOME%;C:...

Actual SETUP:

  • OS: Windows 8.1
  • JDK file: jdk-8u11-windows-x64.exe
  • ADT file: installer_r23.0.2-windows.exe

Install the x64 JDK, and try the back-next option first, and then try setting JAVA_HOME like the error message says, but if that doesn't work for you either, then try this:

Do as it says, set JAVA_HOME in your environment variables, but in the path use forward slashes instead of backslashes.

Seriously.

For me it failed when JAVA_HOME was C:\Program Files\Java\jdk1.6.0_31 but worked fine when it was C:/Program Files/Java/jdk1.6.0_31 - drove me nuts!

If this is not enough, also add to the beginning of the Environment Variable Path %JAVA_HOME%;

Updated values in System Environment Variables:

  • JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
  • JRE_HOME=C:/Program Files/Java/jre8
  • Path=%JAVA_HOME%;C:...
无尽的现实 2024-10-13 16:32:50

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

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

谁会想到会发生这样的事?

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

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

Who would have thought that would happen?

可爱咩 2024-10-13 16:32:50

好像没有32位JDK就不行。
只需安装它并快乐...

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

输什么也不输骨气 2024-10-13 16:32:50

我下载了 .zip 存档并运行 SDK Manager.exe,它的工作非常顺利。否则,您对 .exe 也有同样的问题。

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.

燕归巢 2024-10-13 16:32:50

警告:正如评论者提到的,不要在 Windows 7 上尝试此操作!我在 Windows XP 64 位上进行了测试。

由于发布的解决方案并不适用于所有人(包括我、我自己和我),我想为那些寻求另一种方法(无需注册表黑客等)在 Windows 64 位系统上解决此问题的人留下一条说明。只需将 PATH(大写字母!!)添加到您的环境变量中并将值设置为您的 JDK 路径。

我将 JDK 添加到现有的“路径”中,但该“路径”不起作用,就像 JAVA_HOME 或“后退”解决方案中的情况一样。将其添加到“PATH”终于成功了。

我希望这对某人有帮助。

Warning: As a commenter mentioned, don't try this on a Windows 7! I tested it with Windows XP 64 bit.

As the posted solution does NOT work for all (including me, myself, and I), I want to leave a note for those seeking for another way (without registry hacking, etc.) to solve this on a Windows 64 bit system. Just add PATH (capital letters!!) to your environment Variables and set the value to your JDK-Path.

I added JDK to the existing "Path" which did not work, like it didn't with JAVA_HOME or the "Back"-Solution. Adding it to "PATH" finally did the trick.

I hope this might be helpful for somebody.

暮年 2024-10-13 16:32:50

您所需要的只是以下两个注册表项。似乎发布其他注册表内容的人基本上只是将所有键从 HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft 复制到 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\1.6]
"JavaHome"="C:\\Program Files\\Java\\jdk1.6.0_23"

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\JavaSoft into 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\Wow6432Node\JavaSoft\Java Development Kit]
"CurrentVersion"="1.6"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit\1.6]
"JavaHome"="C:\\Program Files\\Java\\jdk1.6.0_23"
悲歌长辞 2024-10-13 16:32:50

这些解决方案都不适合我。我通过暂时将 C:\Windows\System32\java.exe 的文件名更改为 java_.exe 来修复此问题

Non of these solutions worked for me. I fixed it by temporarily changing the filename of C:\Windows\System32\java.exe to java_.exe

人海汹涌 2024-10-13 16:32:50

这里的解决方案均不适用于 64 位版本。

JDK 路径放在环境变量中的 c:\windows\system32\ 路径之前即可解决该问题。否则,在 64 位 JDK 版本之前找到 32 位 java.exe

None of the solutions here worked for the 64-bit version.

Putting the JDK path before the c:\windows\system32\ path in your environment variables solves the problem. Otherwise the 32-bit java.exe is found before the 64-bit JDK version.

薄凉少年不暖心 2024-10-13 16:32:50

阅读了几篇博客文章后,当安装程序提示找不到 JDK 时,单击返回似乎是一个更简单的修复方法,然后只需单击 <再次strong>NEXT,它神奇地找到了 JDK。没有注册表混乱或重新下载等。

After reading a couple of blog posts, it does seem to be even an easier fix by clicking BACK when the installer says couldn't find the JDK, and then simply click NEXT again and magically it finds the JDK. No registry messing around or re-downloading etc..

青春有你 2024-10-13 16:32:50

添加 JAVA_HOME 环境变量(在系统变量下)对我来说很有效。
单击“后退”和“下一步”按钮不起作用。

Windows 7 Professional x64,JDK 1.7.0_04(64 位,我没有安装 x86 版本)

我认为安装程序会尝试在特定(1.6?)版本中查找 JDK,如果找不到它,请检查 JAVA_HOME 这是在我的情况下没有设置。我有另一台计算机(相同的系统,但使用 JDK 1.6 x64),它可以在没有 JAVA_HOME 变量的情况下工作。

您不必安装 32 位版本的 JDK :)

Adding JAVA_HOME environment variable (under System Variables) did the trick for me.
Clicking "Back" and "Next" buttons didn't work.

Windows 7 Professional x64, JDK 1.7.0_04 (64 bit, I don't have x86 version installed)

I think that installer tries to find JDK in specific (1.6?) version and if it can't find it, checks JAVA_HOME which was not set in my case. I have another computer (the same system but with JDK 1.6 x64) and it worked without JAVA_HOME variable.

You don't have to install 32 bit version of JDK :)

著墨染雨君画夕 2024-10-13 16:32:50

我从以下位置复制了 Java.exe

C:\Windows\System32

C:\Windows\SysWOW64

并且它有效。

我使用的是 64 位 Windows 8。

I copied the Java.exe from

C:\Windows\System32

to

C:\Windows\SysWOW64

and it worked.

I'm using 64 bit Windows 8.

挽心 2024-10-13 16:32:50

JAVA_HOME 环境变量设置为

C:\Program Files\Java\jdk1.7.0_07

而不是

C:\Program Files\Java\jdk1.7.0_07\bin

为我修复了它。

Setting the JAVA_HOME environment variable to

C:\Program Files\Java\jdk1.7.0_07

instead of

C:\Program Files\Java\jdk1.7.0_07\bin

fixed it for me.

与之呼应 2024-10-13 16:32:50

上面的人说:“我也遇到了这个问题,但没有一个答案有帮助。我所做​​的,我从 JAVA_HOME 变量中删除了最后一个反斜杠,它开始工作。另外,记住不要包含 bin路径中的文件夹。”这实际上是正确的答案。

为了安装这个 SDK,我就是这么做的。我正在运行最新的 Microsoft 操作系统 Windows 8。

用户变量:

路径C:\Program Files\Java\jdk1.7.0_07\bin

环境变量

创建这两个:

CLASSPATH %HOME_JAVA%\jre\lib

HOME_JAVA C:\Program Files\Java\jdk1.7.0_09

这个已经存在,所以只需编辑:

路径 在 WindowsPowerShell\v1.0\ 的这一端只需添加“;C:\Program
文件\Java\jdk1.7.0_09"

这就是我所做的,它对我有用。=)

The guy above who put this: "I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path." This was in fact the correct answer.

For this SDK to install this is what I did. I am running the latest Microsoft OS Windows 8.

User Variables:

Path C:\Program Files\Java\jdk1.7.0_07\bin

Environment Variables

Create these two:

CLASSPATH %HOME_JAVA%\jre\lib

HOME_JAVA C:\Program Files\Java\jdk1.7.0_09

This one already exists so just edit:

Path At this end of WindowsPowerShell\v1.0\ simply add ";C:\Program
Files\Java\jdk1.7.0_09"

This is what I did and it worked for me. =)

清晨说晚安 2024-10-13 16:32:50

此注册表修复对我的 Windows 7 x64 设置非常有效: http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/

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/

浅忆流年 2024-10-13 16:32:50

报告错误确定下一步 将启用。

Press Report error and OK. Next will be enabled.

紫竹語嫣☆ 2024-10-13 16:32:50

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

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

风吹雨成花 2024-10-13 16:32:50

另外,以管理员身份运行!为我解决了反斜杠问题。

Also, RUN AS ADMINISTRATOR! Worked for me with backslash fix.

征﹌骨岁月お 2024-10-13 16:32:50

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

  1. JDK(32 位)
  2. Android SDK(安装 SDK 时,请确保将其安装在“C:\Program Files (x86)”以外的目录中,更可能安装在其他驱动器中或解压 Eclipse 的目录中)
  3. Eclipse(32 位)最后是ADT

我尝试了一下,一切正常。

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 software that you are installing should be 32 bit. Android SDK itself is 32 bit and it identifies only 32 bit JDK. So install following software.

  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.

I tried it and all works fine.

So尛奶瓶 2024-10-13 16:32:50

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

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

挖个坑埋了你 2024-10-13 16:32:50

我也遇到过这个问题,但所有答案都没有帮助。我所做的,是从 JAVA_HOME 变量中删除最后一个反斜杠,然后它就开始工作了。另外,请记住不要在路径中包含 bin 文件夹。

I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path.

神魇的王 2024-10-13 16:32:50

Android SDK是32位应用程序,它需要32位JDK才能工作...64位JDK不会有任何用处...

Android SDK is 32 bit app, and it requires the 32 bit of JDK to work... the 64 bit JDK won't make any use for it...

青衫儰鉨ミ守葔 2024-10-13 16:32:50

1-简单地完成“JAVA_HOME”环境变量的事情。

2-右键单击 Android SDK,然后从兼容选项卡中选择 Windows 7 和管理员。

3-再次运行。

1-Simply done the "JAVA_HOME" environment variable thing.

2-Right-Click on Android SDK and from compatibletiy Tab Select windows 7 and administrator.

3-Run it again.

睡美人的小仙女 2024-10-13 16:32:50

工作解决方案,无需修改注册表

只需将 java bin 路径放在 PATH 环境前面即可。

PATH before

C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)

PATH after

C:\Program Files\Java\jdk1.6.0_18\bin;C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)

现在 Android SDK 安装程序正在运行。

顺便说一句,我运行的是 Win7 x64。

WORKING SOLUTION AND NO REGISTRY MODIFY NEEDED

Simply put your java bin path in front of your PATH environment.

PATH before

C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)

PATH after

C:\Program Files\Java\jdk1.6.0_18\bin;C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)

And now the Android SDK installer is working.

BTW, I'm running Win7 x64.

梅倚清风 2024-10-13 16:32:50

对于 Windows 8 x 64 上的 installer_r21.1-windows.exe,对我有用的是将我的用户环境变量 JAVA_HOME 设置为 C:\Program Files\Java\jdk1.7.0_10。
希望这对大家有帮助! :)

For installer_r21.1-windows.exe on Windows 8 x 64 what worked for me was setting up my user environment variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_10.
Hope this helps you all! :)

流心雨 2024-10-13 16:32:50

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

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

雪化雨蝶 2024-10-13 16:32:50

我正在运行 64 位版本的 Windows 7,并且在尝试使用以下可执行文件安装 Android Studio 1.0 时遇到此问题:

http://developer.android.com/tools/studio/index.html

我尝试了所有列出的解决方案以及几个不同版本的 JDK 1.7 和 1.8 - 没有骰子。我安装了该应用程序的压缩版本,它的工作方式就像一个魅力:

http:// tools.android.com/download/studio/canary/latest

仍然对这个问题感到困惑;特别是 Android Studio 的 Beta 版本运行得很好。

I'm running a 64-bit version of Windows 7 and I was getting this issue when attempting to install Android Studio 1.0 using the executable from:

http://developer.android.com/tools/studio/index.html

I tried all the listed solutions and several different versions of JDK 1.7 and 1.8 -- no dice. I went with installing the zipped version of the application and it worked like a charm:

http://tools.android.com/download/studio/canary/latest

Still baffled by this problem; especially since beta versions of Android Studio worked just fine.

萌无敌 2024-10-13 16:32:50

上述方法在 Windows 8 Pro 中对我不起作用。

只需将路径设置为

C:\Program Files\Java\jdk1.7.0_07\

“其中 C 是安装 JDK 的驱动器”。

不要忘记末尾的反斜杠。

The above methods did not work for me in Windows 8 Pro.

Just set the path to

C:\Program Files\Java\jdk1.7.0_07\

Where C is your drive in which you have installed the JDK.

Don't forget the backward slash at the end.

飘逸的'云 2024-10-13 16:32:50

4 种不同的解决方案:

1) 如果出现上述屏幕,只需单击 BACK 按钮,然后从上一屏幕单击 NEXT按钮。其实很傻,但是听起来不错。

2) 下载 SDK 管理器 .zip 格式而不是 .exe 格式,然后尝试安装。这一切都很愚蠢,但是却很有魅力。

3)如果您安装了64位 JDK,则只需卸载它并安装32位JDK即可。

4) 您必须将其更改如下,

JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
JRE_HOME=C:/Program Files/Java/jre8
Path=%JAVA_HOME%;C:…

4 Different Solutions:

1) If you get above screen, just click BACK button and from previous screen click NEXT button. Actually silly, but sounds good.

2) Download SDK Manager .zip format instead of .exe and then try to install. It’s all so silly, but work like a charm.

3) If you installed 64 bit JDK means, just uninstall that and install 32-bit JDK.

4) You have to change that as following,

JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
JRE_HOME=C:/Program Files/Java/jre8
Path=%JAVA_HOME%;C:…
潇烟暮雨 2024-10-13 16:32:50

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文