skip to Main Content

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


  1. 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:

    distributionUrl=https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
    

    Cleaning gradle before retrying is also helpful:

    gradle clean 
    
    Login or Signup to reply.
  2. This is my solution:

    distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip
    

    enter image description here

    Login or Signup to reply.
  3. 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 :

    • Check the compatibility here.
    • Then go to the files gradle/wrapper/gradle-wrapper.properties and android/gradle/wrapper/gradle-wrapper.properties
    • Set the attribute distributionUrl with the compatible version of gradle

    Run the project and now you are okay

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search