dart-windows / win32

Build Win32 apps with Dart!
https://win32.pub
BSD 3-Clause "New" or "Revised" License
735 stars 118 forks source link

Error: The specified language version is too high. The highest supported language version is 3.3 #853

Closed wantroba closed 1 month ago

wantroba commented 1 month ago

My output:

../../AppData/Local/Pub/Cache/hosted/pub.dev/win32-5.5.1/lib/win32.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.3.
// Copyright (c) 2020, Dart | Windows.  Please see the AUTHORS file
^
../../AppData/Local/Pub/Cache/hosted/pub.dev/win32-5.5.1/lib/src/com/iwinhttprequest.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.3.
// iwinhttprequest.dart
^
[.........]
^
../../AppData/Local/Pub/Cache/hosted/pub.dev/win32-5.5.1/lib/src/winmd_constants.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.3.
// Copyright (c) 2020, Dart | Windows.  Please see the AUTHORS file
^
../../AppData/Local/Pub/Cache/hosted/pub.dev/win32-5.5.1/lib/src/constants_metadata.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.3.
// Copyright (c) 2020, Dart | Windows.  Please see the AUTHORS file
^
../../AppData/Local/Pub/Cache/hosted/pub.dev/win32-5.5.1/lib/src/bstr.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.3.
// A wrapper for BSTR string types.
^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\wantr\Dev\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* 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 5s
Error: Gradle task assembleDebug failed with exit code 1

My futter doctor:

[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [versÆo 10.0.22631.3593], locale pt-BR)
    • Flutter version 3.19.6 on channel stable at C:\Users\wantr\Dev\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (4 weeks ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\wantr\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Ferramentas de Build do Visual Studio 2019 16.11.29)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Ferramentas de Build do Visual Studio 2019 version 16.11.33927.289
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2023.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)

[√] VS Code (version 1.89.1)
    • VS Code at C:\Users\wantr\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (4 available)
    • motorola one vision (mobile) • 0057522981 • android-arm64  • Android 11 (API 30)
    • Windows (desktop)            • windows    • windows-x64    • Microsoft Windows [versÆo 10.0.22631.3593]
    • Chrome (web)                 • chrome     • web-javascript • Google Chrome 124.0.6367.202
    • Edge (web)                   • edge       • web-javascript • Microsoft Edge 124.0.2478.67

[√] Network resources
    • All expected network resources are available.

• No issues found!
halildurmus commented 1 month ago

Can you share your pubspec.yaml file, please?

wantroba commented 1 month ago

I found out what happened. I had an outdated dart version. I ran the command flutter upgrade and now it's working!