javaandroidandroid-studiounsupported-class-version

Android Studio Error "Unsupported class file major version 61"


I moved my Android Studio project from one computer to another computer and now I get this error:

"Unsupported class file major version 61" .

enter image description here

How can I fix this?


Solution

  • With the help of @Robert answer,
    I found out that the problem was with JAVA 17 and that the Gradle JDK in use was:
    Android Studio java home version 17.0.1

    I changed it to:
    Android Studio default JDK version 11.0.10

    enter image description here

    Then everything worked like before...

    You'll find the Gradle Settings under File > Project Structure...
    enter image description here

    ...or through the Toolbar button: Project Structure...
    enter image description here

    Then click the Gradle Settings link. enter image description here