A problem occurred evaluating root project ‘android’.
A problem occurred configuring project ‘:app’.
Could not open project generic class cache for build file ‘C:UsersInFED LaptopDocumentsGitHubsustain-and-saveandroidappbuild.gradle’ (C:UsersInFED Laptop.gradlecaches7.5.1scriptscgusqz2rdd56uogb1dahk58km).
> BUG! exception in phase ‘semantic analysis’ in source unit ‘BuildScript‘ Unsupported class file major version 63
3
Answers
Please check gradle compatibility from here https://docs.gradle.org/current/userguide/compatibility.html and use the compatible version.
I’m using java
19.0.1
. Updating Gradle version as below can solve the issue:Cleaning gradle before retrying is also helpful:
This is my solution:
I had the same bug, and I found that the bug is caused by non compatibility of gradle user.
And the following works for me :
gradle/wrapper/gradle-wrapper.properties
andandroid/gradle/wrapper/gradle-wrapper.properties
distributionUrl
with the compatible version of gradleRun the project and now you are okay