Android Studio and environment variables

107 Views Asked by At

In my "user variables" I have ANDROID_HOME, GRADLE_HOME and JAVA_HOME.

Android studio is giving me the following warning:

"Multiple Gradle daemons might be spawned because the Gradle JDK and JAVA_HOME locations are different. Project 'MyApp' is using the following JDK location when running Gradle: 'C:\Program Files\Android\Android Studio\jbr' The system environment variable JAVA_HOME is: 'C:\Program Files\Java\jdk-15' If you dont need to use different paths (or if JAVA_HOME is undefined), you can avoid spawning multiple daemons by setting JAVA_HOME and the JDK location to the same path."

What is the difference with ANDROID_HOME, GRADLE_HOME and JAVA_HOME? Do I just delete Gradle home? Can I delete any of them down to just JAVA_HOME?

any help would be grateful.

Thank you!

2

There are 2 best solutions below

2
Murat K. On

I would click on File -> Settings then search for Gradle, then check the Gradle JDK path and compare it with my JAVA_HOME where I installed my jdk.

0
LOG_TAG On

Now with JBR in windows use C:\Program Files\Android\Android Studio\jbr\bin at SYSTEM ENV add path variable,