flutterdartfvm

flutter requires SDK version, but version is correctly installed


$fvm flutter run 
Running "flutter pub get" in flutterweb...                      
The current Dart SDK version is 2.13.4.

Because flutterweb requires SDK version >=2.14.0 <3.0.0, version solving failed.

I have this error.

Hoever --version is 2.14.2

$ dart --version
Dart SDK version: 2.14.2 (stable) (Wed Sep 15 12:32:06 2021 +0200) on "macos_x64"

in pubspec.yaml

environment:
  sdk: ">=2.14.0 <3.0.0"

Where should I check??


Solution

  • I did it this way: Open the cmd as Administrator, and run:

    flutter upgrade
    

    This works for me.

    Code at cmd