java 即使安装了 JDK 8,Android Studio 也不会安装
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29070668/
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
Android studio not installing even if JDK 8 is installed
提问by Mei Tetra
I just downloaded Google's new android studio bundle(x64 for Windows) and also installed JDK8 (C:\Program Files\Java\jdk1.8.0_25) (x64 version).
我刚刚下载了谷歌的新 android studio bundle(x64 for Windows) 并安装了 JDK8 (C:\Program Files\Java\jdk1.8.0_25)(x64 版本)。
But on the android studio setupit does not detect JDK and asks to locate its path. I located its path but still it says it is not valid.
但是在android studio 设置中,它没有检测到 JDK 并要求定位它的路径。我找到了它的路径,但它仍然说它无效。
I tried declaring new Environment variables (both system and User) but still I get same error.
我尝试声明新的环境变量(系统和用户),但仍然出现相同的错误。
I also tried in cmd, and it says that java & JDK is installed.
我也在cmd中尝试过,它说安装了java和JDK。
After that I reinstalled JDK 8 for windows x64 from Oracle. But no changes in android studio...
之后,我从 Oracle 为 windows x64 重新安装了 JDK 8。但是android studio没有任何变化......
Please Help. !
请帮忙。!
采纳答案by Daniel Nugent
It needs JDK 7, as stated on the System Requirements page: http://developer.android.com/sdk/index.html#Requirements
它需要 JDK 7,如系统要求页面所述:http: //developer.android.com/sdk/index.html#Requirements
Update:
更新:
For Android Studio 2.1, it needs JDK 8 for Windows or Linux, and JDK 6 for Mac.
对于 Android Studio 2.1,Windows 或 Linux 需要 JDK 8,Mac 需要 JDK 6。
回答by user5803922
I had the same problem. I discovered that it was caused because I installed the JDK while the Android Studio installer was still opened and at the prompt to load the location of the JDK. Closing the Android installer and then reloading it after the JDK installation had completed and was closed out, solved the installation problem for me.
我有同样的问题。我发现是因为我在Android Studio安装程序仍然打开并提示加载JDK的位置时安装了JDK引起的。关闭Android安装程序,然后在JDK安装完成并关闭后重新加载它,为我解决了安装问题。
回答by Mustafa Shahoud
回答by user5127121
While running Java 6 something I tried to install Android Studio. Android Studio did not find Java 7 or Java 8, so it asked me to install at least Java 7 and gave a link to Java 7. While the original instance of Android Studio Installer was still alive, it would not find Java 7 or 8. killing and restarting Android Studio Installer worked just fine. So install Java and restart the installer.
在运行 Java 6 时,我尝试安装 Android Studio。Android Studio 没有找到 Java 7 或 Java 8,所以它要求我至少安装 Java 7 并提供指向 Java 7 的链接。虽然 Android Studio 安装程序的原始实例仍然存在,但它找不到 Java 7 或 8。杀死并重新启动 Android Studio 安装程序工作得很好。所以安装Java并重新启动安装程序。
回答by nafees ahmed
回答by Sumit Singh
Try following steps if it works.
如果有效,请尝试以下步骤。
- goto the AndroidStudioinstallation folder.
- goto bin folder and open studio.batin text editor
add set
JAVA_HOME=C:\Program Files\Java\jdk1.8.0//your java path
- goto
Start -> All Programmes -> Android Studio ->
Right clickon Android Studio and clickonproperties
. - You will see the Target like <
installation path>android-studio\bin\studio64.exe
change it to<installation path>android-studio\bin\studio.bat
- 转到AndroidStudio安装文件夹。
- 转到 bin 文件夹并在文本编辑器中打开studio.bat添加集
JAVA_HOME=C:\Program Files\Java\jdk1.8.0//your java path
- 转到
Start -> All Programmes -> Android Studio ->
右键单击在Android Studio和点击上properties
。 - 您将看到像 < 将目标
installation path>android-studio\bin\studio64.exe
更改为<installation path>android-studio\bin\studio.bat
回答by Dragon Balls
I solved this problem by closing the installation file, and open it again as an administrator. Pre over the need to set jdk.
我通过关闭安装文件解决了这个问题,并以管理员身份再次打开它。pre 以上需要设置jdk。