For anyone on MacBooks, you might want to check if the file in /Users/username/.gradle/gradle.properties
has the correct JDK path provided.
I was receiving the following message in Android Studio:
Value '/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home' given for org.gradle.java.home Gradle property is invalid (Java home supplied is invalid)
My gradle.properties
file had the following line:
org.gradle.java.home=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home
And I had to change it to the following:
org.gradle.java.home=/Applications/Android Studio 4.1.3.app/Contents/jre/jdk/Contents/Home
Since I renamed Android Studio.app
to Android Studio 4.1.3.app
since I have multiple installations.