Gradle say Java home is different in macOS Catalina.
But /System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
is /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
The newly created daemon process has a different context than expected.
Java home is different.
Expecting: '/System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home' but was: '/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home'.
Please configure the JDK to match the expected one.
I have done the following, but it does not solve the problem.
- Add gradle.properties in
~/.gradle/gradle.properties
org.gradle.java.home=/System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
Export JAVA_HOME=/System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
Environment
------------------------------------------------------------
Gradle 5.5.1
------------------------------------------------------------
Build time: 2019-07-10 20:38:12 UTC
Revision: 3245f748c7061472da4dc184991919810f7935a5
Kotlin: 1.3.31
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 12.0.2 (Oracle Corporation 12.0.2+10)
OS: Mac OS X 10.15 x86_64