简体   繁体   English

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

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

On Windows 7 I have installed the Java SE JDK, then rebooted. 在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。

在此处输入图片说明

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变量。

我发现如果我按Android SDK安装程序上的“后退”按钮,然后再次按“下一步”按钮,它将起作用!

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. 问题是安装的Windows 7是64位,而要安装的所有软件都应该是32位。 Android SDK itself is 32 bit and it identifies only 32 bit JDK. Android SDK本身是32位的,只能识别32位的JDK。 So install following softwares. 因此,请安装以下软件。

  1. JDK (32 bit) JDK(32位)
  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) Android SDK(在安装SDK时,请确保将其安装在“ C:\\ Program Files(x86)”以外的目录中,更可能安装在其他驱动器或Eclipse提取目录中)
  3. Eclipse (32 bit) and finally ADT. Eclipse(32位),最后是ADT。

i tried it and all works fine. 我尝试了,一切正常。

You Should Create an Environment Variable to Point to Your java Directory. 您应该创建一个环境变量以指向您的java目录。 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 : 转到我的电脑>右键单击可用空间>选择属性>在左栏中选择“高级系统设置”>转到“高级”选项卡>按下环境变量按钮>在“系统变量”中,单击“新建”:

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”,则该路径将不起作用。

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. 我不想卸载64位jdk,而其他建议却无效。 So I just downloaded the 32-bit and re-ran the windows installer. 因此,我刚刚下载了32位并重新运行Windows安装程序。

Voila, it works and doesn't take the 32-bit either. 瞧,它可以工作,也不占用32位。 It takes the 64-bit higher version instead. 它采用64位更高的版本。

I feel it just feels safe with the presence of the 32-bit jdk :P 我觉得使用32位jdk:P感觉很安全

When you downloaded sdk, running via browser's downloaded files section right? 当您下载sdk时,通过浏览器的下载文件部分运行对吗? application can't detect java in this state. 应用程序无法在此状态下检测到Java。 if you run it via directly its own folder, it will find sdk. 如果直接通过它自己的文件夹运行它,它将找到sdk。 simple 简单

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM