gradle-doctor
gradle-doctor copied to clipboard
Add shell fallback for JAVA_HOME detection
The error "JAVA_HOME is not set" persisted even after setting the variable in shell config files:
| 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. |
Added a fallback mechanism to retrieve JAVA_HOME via shell command when System.getenv() fails to detect it.