0

I'm trying to learn on how to create a Flutter app and connect it to Firebase and one of the steps in the course that I'm learning from, the instructor wrote this line in the terminal:

./gradlew signingreport

so the overall path right now is this:

PS C:\Users\Rashed\Desktop\workspace\firebase_practice\android> ./gradlew signingreport

But when I do this I'm greeted with this error:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Rashed\Desktop\workspace\firebase_practice\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\Rashed\Desktop\workspace\firebase_practice\android\app\build.gradle' (C:\Users\Rashed\.gradle\caches\7.5\scripts\47ckv1l1dgtaf1eupsm27romw).
      > 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 673ms

Please note that this a brand new project which means I haven't wrote a single line.

Any idea on how to fix this error?

Rashid Dev
  • 21
  • 4
  • There is a quite big thread on how to get that SHA Key for android and ios: https://stackoverflow.com/questions/51845559/generate-sha-1-for-flutter-react-native-android-native-app – Marcel Dz Mar 01 '23 at 15:07

1 Answers1

0

Here is just an idea. Try updating your update your Java version to a compatible version with your Gradle build system. Additionally, you may need to update the Gradle version or clean the Gradle cache by deleting the C:\Users\Rashed.gradle\caches folder and then rebuilding your project.

Kman
  • 76
  • 4
  • Thank you man, it was as simple as this, just run Flutter clean, but i have accepted your answer cause it does the same thing. – Rashid Dev Mar 01 '23 at 16:16