Flutter - FAILURE: Build failed with an exception | Unsupported class file major version 60

105
April 28, 2022, at 05:50 AM

I've a flutter project on git.

Yesterday I made a PR. No configuration files were changed, just two dart files. Since then, the application no longer starts, whether on a real device or on an emulator.

I tried to change my JDK (8, 11, 16 and 17)

Error :

FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\arnou\Documents\GitHub\S3A_S02_ARNOUX_BRASLEY_STEINER_VIGNERON\charlemiapp-cli\android\settings.gradle' (C:\Users\arnou\.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 1s
Exception: Gradle task assembleDebug failed with exit code 1

Output of Flutter Doctor -v :

[✓] Flutter (Channel stable, 2.10.0, on Microsoft Windows [version 10.0.22000.469], locale fr-FR)
    • Flutter version 2.10.0 at C:\Users\arnou\Documents\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5f105a6ca7 (6 days ago), 2022-02-01 14:15:42 -0800
    • Engine revision 776efd2034
    • Dart version 2.16.0
    • DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\arnou\AppData\Local\Android\sdk
    • Platform android-31, build-tools 30.0.3
    • Java binary at: C:\Program Files\Java\jdk-16\bin\java
    • Java version Java(TM) SE Runtime Environment (build 16+36-2231)
    • All Android licenses accepted.
[✗] 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.
[✗] Visual Studio - develop for Windows
    ✗ Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[☠] IntelliJ IDEA Ultimate Edition (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
      about this issue at https://github.com/flutter/flutter/issues.
    ✗ FormatException: Unexpected extension byte (at offset 5)
    • #0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1789:7)
      #1      Utf8Decoder.convert (dart:convert/utf.dart:351:42)
      #2      InputStream.readString (package:archive/src/util/input_stream.dart:207:30)
      #3      new ZipDirectory.read (package:archive/src/zip/zip_directory.dart:40:30)
      #4      ZipDecoder.decodeBuffer (package:archive/src/zip_decoder.dart:19:30)
      #5      ZipDecoder.decodeBytes (package:archive/src/zip_decoder.dart:14:12)
      #6      IntelliJPlugins._findPluginXml (package:flutter_tools/src/intellij/intellij.dart:130:44)
      #7      IntelliJPlugins._readPackageVersion (package:flutter_tools/src/intellij/intellij.dart:141:40)
      #8      IntelliJPlugins.validatePackage (package:flutter_tools/src/intellij/intellij.dart:63:35)
      #9      IntelliJValidator.validate (package:flutter_tools/src/intellij/intellij_validator.dart:103:15)
      #10     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:32)
      #11     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109:18)
      #12     _rootRun (dart:async/zone.dart:1426:13)
      #13     _CustomZone.run (dart:async/zone.dart:1328:19)
      #14     _runZoned (dart:async/zone.dart:1861:10)
      #15     runZonedGuarded (dart:async/zone.dart:1849:12)
      #16     runZoned (dart:async/zone.dart:1780:12)
      #17     asyncGuard (package:flutter_tools/src/base/async_guard.dart:109:3)
      #18     Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:205:9)
      #19     Doctor.diagnose (package:flutter_tools/src/doctor.dart:309:47)
      #20     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:50:48)
      #21     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1320:12)
      <asynchronous suspension>
      #22     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1161:27)
      <asynchronous suspension>
      #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #24     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
      <asynchronous suspension>
      #25     FlutterCommandRunner.runCommand.<anonymous closure>
      (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
      <asynchronous suspension>
      #26     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #27     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
      <asynchronous suspension>
      #28     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
      <asynchronous suspension>
      #29     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #30     main (package:flutter_tools/executable.dart:94:3)
      <asynchronous suspension>

[✓] VS Code (version 1.64.0)
    • VS Code at C:\Users\arnou\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.32.0
[✓] Connected device (2 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [version 10.0.22000.469]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 98.0.1108.43
[✓] HTTP Host Availability
    • All required HTTP hosts are available
! Doctor found issues in 4 categories.

I've also tried to reinstall Flutter, Dart, Intellij plugins. I've deleted .idea and some cache files but no changes.

Rent Charter Buses Company
READ ALSO
service crash with &quot;Context.startForegroundService() did not then call Service.startForeground()&quot;

service crash with "Context.startForegroundService() did not then call Service.startForeground()"

Hello friendsI use this code inside the service for the pedometer service and I will encounter the following error

177
Dowload Media in Download directory in android app

Dowload Media in Download directory in android app

Am trying to download media file from server to android default Downloads directory,but on storing the media in downloads i got exception javaio

91
Fixing header (navbar) in webview flutter

Fixing header (navbar) in webview flutter

I am currently working on a project where I need to convert a website to a mobile app using flutter I did it with the widget WEBVIEW but the header of the webview in my mobile is not fixed when i scroll the page the header (navBar) of my website scroll...

103
Transparent or Invisible

Transparent or Invisible

I'm trying to use an ImageView without any backgroundI know that I can use

125