However, a while ago, Google introduced something bizarre: they started overriding the global JAVA_HOME to their bundled JDK, and moved out the originally defined value to the GRADLE_LOCAL_JAVA_HOME.
As per newer versions of Android Studio we have:
Where GRADLE_LOCAL_JAVA_HOME is my actual JAVA_HOME.
As you can see, they forcibly swapped it, which is extremely weird IMO.
If I switch to GRADLE_LOCAL_JAVA_HOME in AS I will obviously get following the message after the configuration is complete:
=============================== Gradle Doctor Prescriptions ============================================
| JAVA_HOME is not set. |
| Please set JAVA_HOME so that switching between Android Studio and the terminal does not trigger a fu |
| ll rebuild. |
| To set JAVA_HOME: (using bash) |
| echo "export JAVA_HOME=$(/usr/libexec/java_home)" >> ~/.bash_profile |
| or `~/.zshrc` if using zsh. |
| |
========================================================================================================
| Gradle is not using JAVA_HOME. |
| JAVA_HOME is null |
| Gradle is using /opt/homebrew/Cellar/openjdk@17/17.0.10/libexec/openjdk.jdk/Contents/Home |
| This can slow down your build significantly when switching from Android Studio to the terminal. |
| To fix: Project Structure -> JDK Location. |
| Set this to your JAVA_HOME. |
| |
========================================================================================================
And this is expected, the doctor plugin works just fine here.
But now within the AS, there's no option to use my real JAVA_HOME and doctor plugin option with its checking at the same time anymore.
Probably you have some suggestions/thoughts about this?
Hey! Thank you for this plugin, very much appreciate the effort you put into development.
I have the following setup for my project:
The plugin version is
0.9.2
.Settings used:
However, a while ago, Google introduced something bizarre: they started overriding the global
JAVA_HOME
to their bundled JDK, and moved out the originally defined value to theGRADLE_LOCAL_JAVA_HOME
.As per newer versions of Android Studio we have:
Where
GRADLE_LOCAL_JAVA_HOME
is my actualJAVA_HOME
. As you can see, they forcibly swapped it, which is extremely weird IMO.If I switch to
GRADLE_LOCAL_JAVA_HOME
in AS I will obviously get following the message after the configuration is complete:And this is expected, the doctor plugin works just fine here. But now within the AS, there's no option to use my real
JAVA_HOME
and doctor plugin option with its checking at the same time anymore.Probably you have some suggestions/thoughts about this?
Thank you!