FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\EBIT-MEDIA\StudioProjects\iamnotpoor2\android\build.gradle' line: 26
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> Could not open proj generic class cache for build file 'C:\Users\EBIT-MEDIA\StudioProjects\iamnotpoor2\android\app\build.gradle' (C:\Users\EBIT-MEDIA\.gradle\caches\7.5\scripts\o651hvr1bjqe635ufmj5bw23).
> 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 3s
Exception: Gradle task assembleDebug failed with exit code 1
1 Like
“Unsupported class file major version 63” means you use Java 19 to run Gradle.
The path one line above it shows you are using Gradle 7.5.
Now have a look at Compatibility Matrix
1 Like
If you are using Android Studio:
- click on Android Studio,
- click on “Build” in menu nav,
- click on “Clean Project”.
^This resolved the issue for me.