October 23, 2024
Chicago 12, Melborne City, USA
Android

How do I set GRADLE_LOCAL_JAVA_HOME?


Whenever I open an existing Android project in Android Studio for the first time, Android Studio sets the Gradle JDK to GRADLE_LOCAL_JAVA_HOME which points to the Android Studio’s built-in JDK. I would like GRADLE_LOCAL_JAVA_HOME to point to a different JDK location (the same that I use in my JAVA_HOME and the one I have in PATH) but I can’t figure out how to do it.

It’s annoying that whenever I open a project I get a wrong JDK by default and I must open the settings and choose the one under JAVA_HOME manually. I would like Android Studio to pick up my custom default automatically instead.

Android Studio Gradle JDK dropdown
Android Studio GRADLE_LOCAL_JAVA_HOME dropdown



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video