0
    FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\devsh\Desktop\programs_\StudioProjects\untitled\android\build.gradle' line: 24

* 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\devsh\Desktop\programs_\StudioProjects\untitled\android\app\build.gradle' (C:\Users\devsh\.gradle\caches\6.7\scripts\67wpoy60578g543vmv9v5k2r9).
      > 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 8s
Exception: Gradle task assembleDebug failed with exit code 1

and this is not it. I have installed android studio still my flutter doctor shows me that I haven't installed it yet and also there is some license issue I don't know how to solve

this is my result of flutter doctor

C:\Users\devsh>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.19042.985], locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio (not installed)
[√] VS Code (version 1.55.2)
[√] Connected device (2 available)

! Doctor found issues in 3 categories.
nvoigt
  • 75,013
  • 26
  • 93
  • 142
john snow
  • 1
  • 1
  • 1
    Does this answer your question? [How to fix "unsupported class file major version 60" in IntelliJ?](https://stackoverflow.com/questions/67079327/how-to-fix-unsupported-class-file-major-version-60-in-intellij) – enzo May 14 '21 at 20:22
  • no this is not the answer I am looking for – john snow May 16 '21 at 04:45

1 Answers1

0

For the Android license issue, what happens when you run flutter doctor --android-licenses on the command line? Hopefully, it'll run you through the steps to accept the licenses.

For the unsupported class issue, does running a Gradle clean solve the problem? To do this, you should be able to navigate to the projects android directory on the command line and run gradlew clean.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Fifer Sheep
  • 2,900
  • 2
  • 30
  • 47