* What went wrong:
Execution failed for task ':gradle:compileGroovy'.
> BUG! exception in phase 'semantic analysis' in source unit 'C:\Users\ACER\AndroidStudioProjects\flutter\packages\flutter_tools\gradle\src\main\groovy\app_pl
ugin_loader.groovy' Unsupported class file major version 65
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 10s
1 actionable task: 1 executed
<-------------> 0% WAITING
> IDLE
The error tells you, that you use Java 21 to run a Gradle version that is not compatible with running on Java 21.
Please have a look at https://docs.gradle.org/current/userguide/compatibility.html to find which version of Java is compatible with the version of Gradle you are using.