无法在Android Studio中更新JDK位置 [英] Cannot update JDK location in Android Studio
问题描述
我无法在Android Studio中更新Java JDK或Android SDK路径.
I cannot update the Java JDK or Android SDK path in Android Studio.
要更新默认的JDK或Android SDK:
- 打开Android Studio
- 转到快速入门->配置->项目默认设置->项目结构
- 更改JDK位置
我的问题/疑问:
应用"按钮不可单击,如果我按确定",则JDK或Android SDK位置永远不会更新. 这是一个视频,显示了当我尝试更新地点.我该如何解决?
The "Apply" button isn't clickable and if I press "OK" the JDK or Android SDK locations are never updated. Here is a video showing what happens when I try to update the location. How can I fix this?
预期结果:
Android Studio应该更新JDK和/或SDK位置.
Android Studio should update the JDK and/or SDK locations.
其他信息:
JAVA_HOME
环境变量与我要在Android Studio中更新的位置匹配.
JAVA_HOME
environment variable matches the location I am trying to update in Android Studio.
Android Studio 1.5.1内部版本141.2456560
Android Studio 1.5.1 Build 141.2456560
Windows 10专业版
Windows 10 Pro
推荐答案
关于Android SDK位置路径中有空格的警告.将SDK移到没有空格的位置并在Android Studio中更新了SDK位置后,便可以使用上述问题中概述的步骤来更新Java JDK位置.
There was a warning about the Android SDK location having spaces in the path. Once I moved the SDK to a location without spaces and updated the SDK location in Android Studio I was then able to update the Java JDK location using the steps outlined in the question above.
由于Android SDK Windows安装程序将始终将Android SDK放在带有空格(程序文件"或程序文件(x86)")的目录中,因此这在将来可能是一个更常见的问题.
This may be a more common problem in the future since the Android SDK Windows installer will always place the Android SDK in a directory with spaces ("Program Files" or "Program Files (x86)").
这篇关于无法在Android Studio中更新JDK位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!