Even I remove and setup again nothing changed.
error
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:UsersOzgurDocumentsflutterprojectsandroidsettings.gradle' (C:UsersOzgur.gradlecaches7.4scriptsea4ydi90mwjg9g63m7r6nimmx).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63
* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1
I remove program and setup again added JAVA_HOME path and reinstall Java JDK-19 and didn’t fix
2
Answers
I recently fixed error it's happening due to gradle version and JDK version aren't capatible. There are 2 solution one of them is remove JDK 19 completelty and install JDK 17 instead of it. Or edit link in gradle-wrapper.properties like this gradle-7.4-all.zip
it looks like gradle cache issues, remove the cache and re-install it via android studio, i will auto-install it based on the version you specified.