A. JDK
- install
jenvbybrew install jenv, install gradle bybrew install gradle - list installed java
jenv versions - install jdk by
brew cask install java - list all installed jdk
/usr/libexec/java_home -V - add JDK to jenv by
jenv add <path>(paths get from step 4). egjenv add /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home - set JDK used by
jenv global <name>(name get from step 2)
B. GRADLE
- specify build errors by
./gradlew --scan. At this step we can know what errors occurred (usually is mismatch versions of lib or JDK) - Modify gradle versions in
distributionUrlin filegradle/gradle-wrapper.properties - remove
task wrapper(type: Wrapper) { gradleVersion = '3.3' }if gradle version > 5