1

According to the documentation, the choose the Embedded JDK option should be found under File > Settings... > Build, Execution, Deployment > Build Tools > Gradle. But I do not see it there. Just updated Android Studio to the latest version Arctic Fox 2020.3.1 Patch 1.

Previously I was testing with the Oracle JDK, but discovered that the OpenJDK is embedded and would like to use that instead.

How can the embedded JDK be selected?

enter image description here

crayden
  • 2,130
  • 6
  • 36
  • 65
  • Facing the same issue, none of the answers seems to work. I am going to try reinstalling Android Studio if I can't find the solution... I've been looking for a while already! – Guillem Poy Jan 17 '23 at 15:06
  • Even reinstalling android studio didn't fix the issue... – Guillem Poy Jan 17 '23 at 15:34
  • I still couldn't find a way of accessing the Embedded JDK option in the Gradle section, but I came here due to this issue https://issuetracker.google.com/issues/265713286, and I fixed it with this solution https://stackoverflow.com/questions/69448462/the-supplied-javahome-seems-to-be-invalid-i-cannot-find-the-java-executable-tr/75108953#75108953 – Guillem Poy Jan 18 '23 at 07:19

2 Answers2

1

Go to the project structure and then select the Gradle setting then you can find the JDK location that is embedded with Android Studio. Embeded JDK location update on Android studio

aslamhossin
  • 1,217
  • 12
  • 22
  • I can't find this "Gradle" setting. My project Structure window looks different: https://i.imgur.com/CJVCsaT.png – Guillem Poy Jan 18 '23 at 07:21
-1

You need to have a project open before you follow those directions in the documentation. The Gradle JDK is configured on a per-project basis.

enter image description here

Gavin Wright
  • 3,124
  • 3
  • 14
  • 35
  • 2
    Even with a project open, these options are not available. – crayden Aug 25 '21 at 04:33
  • @crayden it has to be a Gradle project. So when you open the project, you need to be opening the directory that directly contains the `build.gradle` file. – Gavin Wright Jan 18 '23 at 19:24