Cannot update JDK location in Android Studio
Asked Answered
P

1

5

I cannot update the Java JDK or Android SDK path in Android Studio.

To update the default JDK or Android SDK:

  1. Open Android Studio
  2. Go to Quick Start -> Configure -> Project Defaults -> Project Structure
  3. Change the JDK location

My problem/question:

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?

Expected results:

Android Studio should update the JDK and/or SDK locations.

Additional info:

JAVA_HOME environment variable matches the location I am trying to update in Android Studio.

Android Studio 1.5.1 Build 141.2456560

Windows 10 Pro

Petulia answered 10/12, 2015 at 10:36 Comment(2)
Have you tried from File Menu?Marucci
@NigamPatro Yes, I have. I figured out a solution and posted it as an answer. You cannot accept your own answer before 2 days. I'll leave the post up and hopefully it will help someone else.Petulia
P
8

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.

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)").

Petulia answered 10/12, 2015 at 10:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.