Fixed
Status Update
Comments
uc...@google.com <uc...@google.com>
rp...@google.com <rp...@google.com>
ch...@google.com <ch...@google.com>
sr...@google.com <sr...@google.com> #2
This is related to bug 132951215 , the cause is that the environment may be configured in a different way when running a terminal and when running Studio. This message is generated by reading the variable from the current environment, not from a terminal.
One way to solve this is to extract this variable from an environment as close as possible to that from a terminal.
One way to solve this is to extract this variable from an environment as close as possible to that from a terminal.
Description
I'm getting this warning:
Android Studio is using this JDK location:
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
which is different to what Gradle uses by default:
/Users/gabriel/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-3/191.5618338/Android Studio 3.6 Preview.app/Contents/jre/jdk/Contents/Home
Using different locations may spawn multiple Gradle daemons if
Gradle tasks are run from the command line while using Android Studio.
The location that I set in the project structure settings is the actual JDK location and is also set as JAVA_HOME. It seems like Studio is unable to read the env var correctly since the project structure settings say that JAVA_HOME points to the JDK that comes with Studio. The warning is a false positive.
From command line: echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/