Because testing_app requires SDK version >=2.16.1 <3.0.0, version solving failed. in flutter
The answer is in the error message:
The current Dart SDK version is 2.15.1. Because testing_app requires SDK version >=2.16.1 <3.0.0, version solving failed.
It means that the project needs Dart SDK in version 2.16.1 (at least), and your version is 2.15.1.
You should upgrade your Flutter version with flutter upgrade
. For more info see the documentation.
DavidIjsud
Updated on January 04, 2023Comments
-
DavidIjsud over 1 year
I am learning more about testing and i want to use Mockito Package and Build Runner Packate then i have my class Cat inside lib/models/cat.dart
then i have my lib/test/cat_test.dart file to test cat class
this is my pubspec.yaml (part of it)
The problem is thrown when i want to run the next command :
dart run build_runner build
and the problem is the next:
Resolving dependencies in /Users/adm/Documents/Things of david/PRACTICAS/Flutter/testing_app... The current Dart SDK version is 2.15.1. Because testing_app requires SDK version >=2.16.1 <3.0.0, version solving failed.
Flutter doctor:
thank you so much for your help.
-
lava about 2 years
environment: sdk: ">=2.14.0 <3.0.0"
change in your pubsec.yaml -
DavidIjsud about 2 yearsThe problem continue but with different error: Resolving dependencies in /Users/adm/Documents/Things of david/PRACTICAS/Flutter/testing_app... (1.7s) Because testing_app depends on integration_test from sdk which doesn't exist (the Flutter SDK is not available), version solving failed. Flutter users should run
flutter pub get
instead ofdart pub get
.
-