Android Studio有时会报“Multiple Gradle deamons…”警告:
Multiple Gradle daemons might be spawned because the Gradle JDK and JAVA_HOME locations are different. Project 'yhpx' is using the following JDK location when running Gradle: 'D:/jdk11_x64' The system environment variable JAVA_HOME is: 'D:\.jdks\openjdk-20.0.2' 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.
或者会提示:
The 'abc' project JDK configuration is now set through the #GRADLE_LOCAL_JAVA_HOME macro. This simplifies the JDK configuration experience and makes it more reliable. You can change this in the Gradle JDK settings.
这是由于Gradle使用的JDK和Android Studio使用的JDK不相同引起的。
点击“Learn more”后会打开链接: