0

FAILURE: Build failed with an exception.

  • What went wrong: Could not open settings generic class cache for settings file C:\Users\moazm\StudioProjects\untitled\android\settings.gradle C:\Users\moazm\.gradle\caches\6.7\scripts\1fnwrr8g4rohfp291nvlxj5qe.

BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60

  • 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 605ms Exception: Gradle task assembleDebug failed with exit code 1

when i tried to run my app on my phone or any emulator it didn't work because of this error .... can you help me with this error , i tried so many solutions but the error stay the same and i also delete android studio and install it again and the error still the same

EDIT::::::: i update the sdkversion on build->app->build.gradle compileSdkVersion 31 minSdkVersion 21 targetSdkVersion 31

1 Answers1

0

This could be an issue with the newer JDK versions. Try using JDK 8 or 11. I have had this issue before, but this thread helped me to solve it,

Could not open settings generic class cache for settings file '