Because project requires SDK version >=2.14.0 <3.0.0, version solving failed even though Dart SDK version is 2.14.0-350.0.dev
4,532
The version of the Dart SDK you have installed is 2.14.0-377.0.dev
; the -377.0.dev
part indicates that it is a development release (a pre-release), which cannot satisfy a requirement for a stable version of 2.14.0 as required by your pubspec.yaml
constraints.
You can set sdk: ">=2.14.0-0 <3.0.0"
instead (note the -0
) to indicate that you accept development versions of 2.14.0.
Author by
Chris
Updated on December 31, 2022Comments
-
Chris over 1 year
I want to make use of typedefs for variables in Dart thus I am trying to update minimum dart version to 2.14.0.
When I change environment toenvironment: sdk: ">=2.14.0 <3.0.0"
I get the following error
[project] flutter pub get Running "flutter pub get" in project... The current Dart SDK version is 2.14.0-377.0.dev. Because project requires SDK version >=2.14.0 <3.0.0, version solving failed. pub get failed (1; Because project requires SDK version >=2.14.0 <3.0.0, version solving failed.) exit code 1
Now I am confused what
>=
means if my version is2.14.something
and it does not satisfy condition>=2.14.0
.
Any idea what's going on?flutter doctor [√] Flutter (Channel dev, 2.5.0-5.0.pre, on Microsoft Windows [Version 10.0.19043.1110], locale en-GB) ...