I am trying to launch my Flutter app on an Android device, I was able just until yesterday, but suddenly today I am getting this error when launching it:
Launching lib/main.dart on Moto G 5S in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings remapped class cache for 7yvt6la2007dno98lt3rzbguf (/Users/modestovascofornas/.gradle/caches/6.3/scripts-remapped/settings_bwqg3axqhj874bje5e9od2vqv/7yvt6la2007dno98lt3rzbguf/settingsdeec0faa97453e2ce860d75e6bf1604b).
> Could not open settings generic class cache for settings file '/Users/modestovascofornas/desarrollo/DESARROLLO 2022 SSD-2/2022-G2-CAPENERGY-FLUTTER-PROFESIONAL/FLUTTER/flutter_capenergy/android/settings.gradle' (/Users/modestovascofornas/.gradle/caches/6.3/scripts/7yvt6la2007dno98lt3rzbguf/settings/settingsdeec0faa97453e2ce860d75e6bf1604b).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 61
* 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 24s
Exception: Gradle task assembleDebug failed with exit code 1
I have tried deleting .gradle folder, but not working
EDIT
This is my ~/.zshrc file
export PATH=/Users/modestovascofornas/flutter/bin:$PATH
export PATH=/Users/modestovascofornas/flutter/.pub-cache/bin:$PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home