This is what I get when I run flutter pub get
SLVR: derived: meta 1.3.0-nullsafety.3
SLVR: derived: matcher 0.12.10-nullsafety.1
SLVR: derived: collection 1.15.0-nullsafety.3
SLVR: derived: charcode 1.2.0-nullsafety.1
SLVR: derived: characters 1.1.0-nullsafety.3
SLVR: derived: boolean_selector 2.1.0-nullsafety.1
SLVR: derived: async 2.5.0-nullsafety.1
SLVR: derived: vector_math 2.1.0-nullsafety.3
SLVR: derived: stack_trace 1.10.0-nullsafety.1
SLVR: derived: clock 1.1.0-nullsafety.1
SLVR: derived: fake_async 1.2.0-nullsafety.1
SLVR: derived: path 1.8.0-nullsafety.1
SLVR: derived: test_api 0.2.19-nullsafety.2
SLVR: fact: flutter_svg >=0.19.2 requires Flutter SDK version >=1.24.0-6.0.pre <2.0.0
SLVR: conflict: flutter_svg >=0.19.2 requires Flutter SDK version >=1.24.0-6.0.pre <2.0.0
SLVR: ! flutter_svg >=0.19.2 is satisfied by flutter_svg ^0.19.2+1
SLVR: ! which is caused by "EasyGroceries depends on flutter_svg ^0.19.2+1"
SLVR: ! thus: version solving failed
SLVR: Version solving took 0:00:00.804514 seconds.
| Tried 1 solutions.
FINE: Resolving dependencies finished (0.8s).
ERR : The current Flutter SDK version is 1.22.4.
|
| Because EasyGroceries depends on flutter_svg >=0.19.2 which requires Flutter SDK version >=1.24.0-6.0.pre <2.0.0, version solving failed.
FINE: Exception type: SolveFailure
FINE: package:pub/src/solver/version_solver.dart 312:5 VersionSolver._resolveConflict
| package:pub/src/solver/version_solver.dart 133:27 VersionSolver._propagate
| package:pub/src/solver/version_solver.dart 97:11 VersionSolver.solve.<fn>
| ===== asynchronous gap ===========================
| dart:async Future.catchError
| package:pub/src/utils.dart 113:52 captureErrors.wrappedCallback
| package:stack_trace Chain.capture
| package:pub/src/utils.dart 126:11 captureErrors
| package:pub/src/command_runner.dart 182:13 PubCommandRunner.runCommand
---- End log transcript ----
pub get failed (1; ---- End log transcript ----)
Process finished with exit code 1
This is my pubspec.yaml
name: EasyGroceries
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
get: ^3.17.1
device_preview: 0.4.7
auto_size_text: ^2.1.0
lottie: ^0.7.0+1
localstorage: ^3.0.0
flutter_spinkit: "^4.1.2"
flutter_launcher_icons: "^0.8.0"
flutter_swiper: ^1.1.6
flutter_svg: ^0.19.2+1
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/appIcon.png"
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/
This is my flutter doctor :
([✓] Flutter (Channel stable, 1.22.4, on Linux, locale en_US.UTF-8)
• Flutter version 1.22.4 at /home/Mark/lib-dev/flutter
• Framework revision 1aafb3a8b9 (11 days ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at /home/Mark/Android/Sdk
• Platform android-30, build-tools 30.0.0
• Java binary at: /home/Mark/lib-dev/androidStudio/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[!] Android Studio (version 3.5)
• Android Studio at /opt/android-studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] Android Studio (version 4.0)
• Android Studio at /home/Mark/lib-dev/androidStudio/android-studio
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[!] VS Code (version 1.51.1)
• VS Code at /usr/share/code
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• MAR LX1A (mobile) • L2N0219A30008750 • android-arm64 • Android 10 (API 29)
! Doctor found issues in 2 categories.)
Hello @MarkAlexanderDev
It looks like this issue could be fixed by updating the Flutter SDK.
Please follow those instructions and hints from the command line
I hope it will help!
@iryna-n-oliinyk
Seems like it doesn't have to do with the flutter SDK.
PS D:\Private\FuerKunden\juli_app> flutter upgrade
Flutter is already up to date on channel stable
Flutter 1.22.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1aafb3a8b9 (3 weeks ago) • 2020-11-13 09:59:28 -0800
Engine • revision 2c956a31c0
Tools • Dart 2.10.4
However, if you switch to flutter channel beta and run flutter upgrade again, the issue seems to be fixed.
The package is supposed to run on the newest version of the stable branch as well, so a quick fix would be appreciated due to the fact it might be unsafe to roll out production apps compiled from the beta branch.
You're likely trying to use too new a version of flutter_svg.
flutter_svg is updated for breaking changes in the Flutter SDK. These are often minor, and it's hard to predict how often it might happen.
When that's done, the lower bound of the Flutter SDK constraint is raised so that users won't get the wrong version. I think ideally, I'd publish these as -dev releases until they're ready for Flutter stable, but I usually forget to do that and I think that might cause other different issues for people anyway :)
Unfortunately, this leads to some confusion. If you're getting this message, you should try the next lower version of flutter_svg until it works.
I agree, those build should be named -dev. Maybe it makes sense to add info this into the readme, or to append this to the changelog so people know if they should use the new version or not? 👍
flutter_svg v0.19.1 currently works on the stable flutter channel v1.22.5
Most helpful comment
flutter_svg v0.19.1 currently works on the stable flutter channel v1.22.5