Slackbot
09/14/2023, 5:00 PMVampire
09/14/2023, 5:09 PM--scan?yudha perwira
09/14/2023, 5:29 PMorg.gradle.java.home in gradle.properties.Vampire
09/14/2023, 5:33 PMVampire
09/14/2023, 5:33 PMAndroid Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
yudha perwira
09/14/2023, 5:36 PMVampire
09/14/2023, 5:36 PMVampire
09/14/2023, 5:36 PMVampire
09/14/2023, 5:36 PMVampire
09/14/2023, 5:37 PMVampire
09/14/2023, 5:37 PMJAVA_HOME environment variableVampire
09/14/2023, 5:37 PM./gradlew --version outputDaniel B Duval
09/14/2023, 7:02 PMJAVA_HOME or anything in your gradle.properties. To ensure that is what you’d expect go Android Studio -> Settings - Build, Execution, Deployment -> Build Tools -> Gradle and ensure the value for Gradle JDK is what you want.
Just make sure you follow the compatibility matrix of AS, AGP and Gradle, or things won’t work - https://developer.android.com/build/releases/gradle-plugin#android_gradle_plugin_and_android_studio_compatibilityVampire
09/14/2023, 7:08 PMDaniel B Duval
09/14/2023, 8:44 PMDavid Ankin
09/23/2023, 6:27 PMYour current JDK is located in C:\Program Files\IBM\SPSS\Statistics\25\JREthis is probably the value of JAVA_HOME which vs code sees. generally a java installation is structured in a directory which has a "bin" folder, inside of which is "java", and in the case of a full jdk (not jre) also "javac" "javadoc" "jar" some profiling tools, etc... you can use a tool like sdkman to download jdks and set your JAVA_HOME variable. it can even change the variable on the fly. (
sdk use java 17.0.8.1-tem or sdk use java 21-open). sdkman windows support is currently that you'll have to download your own "zip" program and place it "in your path", but it works great with Git Bash for windows - which you have to install anyways as git is a prerequisite for most software development anyways these days.