Android SDK安装找不到JDK
我正在尝试在 Windows 7 x64 系统上安装 Android SDK。
jdk-6u23-windows-x64.exe
已安装,但 Android SDK 安装程序拒绝继续,因为它找不到 JDK 安装。
这是一个已知问题吗?有解决办法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(30)
收到通知后按返回,然后按下一步。这次它将找到
JDK
。Press Back when you get the notification and then Next. This time it will find the
JDK
.实际设置:
安装
x64 JDK
,并首先尝试 back-next 选项,然后尝试按照错误消息所述设置JAVA_HOME
,但如果这对您也不起作用,然后试试这个:按照它说的那样,在环境变量中设置
JAVA_HOME
,但在路径中使用正斜杠而不是反斜杠。严重地。
对我来说,当
JAVA_HOME
为C:\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:
Install the
x64 JDK
, and try the back-next option first, and then try settingJAVA_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
wasC:\Program Files\Java\jdk1.6.0_31
but worked fine when it wasC:/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:...
我找到了解决方案,而且它非常愚蠢。我发现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?
好像没有32位JDK就不行。
只需安装它并快乐...
It seems like it doesn't work without 32 bit JDK.
Just install it and be happy...
我下载了 .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.警告:正如评论者提到的,不要在 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.
您所需要的只是以下两个注册表项。似乎发布其他注册表内容的人基本上只是将所有键从 HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft 复制到 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft 中,
这显然不是一个理想的解决方案,因为大多数密钥都是不需要的。
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
intoHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft
,which obviously isn't an ideal solution because most of the keys aren't needed.
这些解决方案都不适合我。我通过暂时将
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
tojava_.exe
这里的解决方案均不适用于 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 thec:\windows\system32\
path in your environment variables solves the problem. Otherwise the32-bit
java.exe
is found before the64-bit JDK
version.阅读了几篇博客文章后,当安装程序提示找不到 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..
添加 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 :)
我从以下位置复制了 Java.exe
到
并且它有效。
我使用的是 64 位 Windows 8。
I copied the Java.exe from
to
and it worked.
I'm using 64 bit Windows 8.
将
JAVA_HOME
环境变量设置为而不是
为我修复了它。
Setting the
JAVA_HOME
environment variable toinstead of
fixed it for me.
上面的人说:“我也遇到了这个问题,但没有一个答案有帮助。我所做的,我从 JAVA_HOME 变量中删除了最后一个反斜杠,它开始工作。另外,记住不要包含 bin路径中的文件夹。”这实际上是正确的答案。
为了安装这个 SDK,我就是这么做的。我正在运行最新的 Microsoft 操作系统 Windows 8。
用户变量:
环境变量
创建这两个:
这个已经存在,所以只需编辑:
这就是我所做的,它对我有用。=)
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:
Environment Variables
Create these two:
This one already exists so just edit:
This is what I did and it worked for me. =)
此注册表修复对我的 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/
按报告错误和确定。 下一步 将启用。
Press Report error and OK. Next will be enabled.
尝试下载并安装压缩版本而不是 .exe 安装程序。
Try downloading and installing the zipped version rather than the .exe installer.
另外,以管理员身份运行!为我解决了反斜杠问题。
Also, RUN AS ADMINISTRATOR! Worked for me with backslash fix.
我遇到了同样的问题,尝试了所有解决方案,但没有任何效果。问题是安装的 Windows 7 是 64 位,而您安装的所有软件都应该是 32 位。 Android SDK本身是32位的,它只识别32位JDK。所以安装以下软件。
我尝试了一下,一切正常。
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.
I tried it and all works fine.
我遇到了同样的问题,并通过安装 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).
我也遇到过这个问题,但所有答案都没有帮助。我所做的,是从 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.
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...
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.
工作解决方案,无需修改注册表
只需将 java bin 路径放在 PATH 环境前面即可。
PATH before
PATH after
现在 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
PATH after
And now the Android SDK installer is working.
BTW, I'm running Win7 x64.
对于 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! :)
是的,安装 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.
我正在运行 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.
上述方法在 Windows 8 Pro 中对我不起作用。
只需将路径设置为
“其中 C 是安装 JDK 的驱动器”。
不要忘记末尾的反斜杠。
The above methods did not work for me in Windows 8 Pro.
Just set the path to
Where C is your drive in which you have installed the JDK.
Don't forget the backward slash at the end.
4 种不同的解决方案:
1) 如果出现上述屏幕,只需单击
BACK
按钮,然后从上一屏幕单击NEXT
按钮。其实很傻,但是听起来不错。2) 下载 SDK 管理器
.zip
格式而不是.exe
格式,然后尝试安装。这一切都很愚蠢,但是却很有魅力。3)如果您安装了64位 JDK,则只需卸载它并安装32位JDK即可。
4) 您必须将其更改如下,
4 Different Solutions:
1) If you get above screen, just click
BACK
button and from previous screen clickNEXT
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,
您必须下载 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.