I am restarting my Android development journey after 9 years, but when I try building my first project on Android Studio v2022.2.1, I encounter this error:
Unsupported Java.
Your build is currently configured to use Java 20.0.1 and Gradle 8.0.
Possible solution:
- Open Gradle wrapper settings, change `distributionUrl` property to use compatible Gradle version and reload the project
I searched for solutions on Stack Overflow and noticed that it's primarily related to Gradle properties and version issues, and most of the solutions recommended to either upgrade the Gradle version to 7.4+ or downgrade the JDK version.
But, I am already using Gradle v8.0 and latest JDK, available for my OS (Windows 10 OS x64 architecture). So, what could be the issue.
I have already attempted the following steps listed in these 2 Stack Overflow answers:
But the issue persists.