The supplied phased action failed with an exception. Execution failed for task ‘:gradle:compileGroovy’

The supplied phased action failed with an exception.
Execution failed for task ‘:gradle:compileGroovy’.
BUG! exception in phase ‘semantic analysis’ in source unit ‘D:\flutter\packages\flutter_tools\gradle\src\main\groovy\app_plugin_loader.groovy’ Unsupported class file major version 64
Unsupported class file major version 64

I’ve been getting various errors related to gradle while using vscode. I changed the gradle version, reinstalled the flutter sdk and android studio. I checked many answers online, but nothing seems to help. Please save me.

Edit:

./gradlew -version

Gradle 7.6.3

Build time: 2023-10-04 15:59:47 UTC
Revision: 1694251d59e0d4752d547e1fd5b5020b798a7e71

Kotlin: 1.7.10
Groovy: 3.0.13
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 20.0.1 (Oracle Corporation 20.0.1+9-29)
OS: Windows 11 10.0 amd64

Leave a Comment