How can I set Android Studio Electric Eel to automatically choice my java home version?

965 Views Asked by At

I updated my Android Studio to Electric Eel. The problem is that every time I create a new project, I have to select the correct Gradle JDK from the Gradle of Settings. Otherwise, it gets the wrong JDK path and throws an error. In Dolphin, it was always getting the correct JDK.

How can I set Android Studio to automatically choice my java home version?

The other JDK choices are in below. Should I delete others? Or should I give specified location?

enter image description here

1

There are 1 best solutions below

1
On

Update JAVA_HOME to C:\Program Files\Android\Android Studio\jbr

Open File Explorer and Navigate to C:\Program Files\Android\Android Studio\jbr and copy everything and paste it to C:\Program Files\Android\Android Studio\jre

Restart your PC and try to run the project again.