Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter :How to solve flutter_svg pub get failed error?

Tags:

flutter

dart

when I install flutter_svg: ^0.18.0 in pubspec.yaml I got error , how to solve this error ?

Pkg url : Click here to view flutter_svg Pkg

Error :

The current Flutter SDK version is 1.17.5.

Because detox depends on flutter_svg >=0.18.0 which requires Flutter SDK version >=1.18.0-6.0.pre <2.0.0, version solving failed.
pub get failed (1; Because detox depends on flutter_svg >=0.18.0 which requires Flutter SDK version >=1.18.0-6.0.pre <2.0.0, version solving failed.)
Process finished with exit code 1

flutter version :

Flutter is already up to date on channel stable
Flutter 1.17.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8af6b2f038 (12 days ago) • 2020-06-30 12:53:55 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4
like image 390
Khalifa Alkhatri Avatar asked Jul 12 '20 08:07

Khalifa Alkhatri


People also ask

How do I fix version solve failed in flutter?

0, version solving failed Error? To Solve flutter packages get failed depends on flutter_test any from SDK which requires SDK version <2.0. 0, version solving failed Just run flutter channel dev and flutter upgrade in your terminal will solve your error.


1 Answers

The version of flutter_svg (0.18.0) can only work with versions of flutter from 1.18.0-6.0.pre above. So you'll have to use a lower version of the flutter_svg package.

Try flutter_svg version 0.17.4

replace

flutter_svg: ^0.18.0

with

flutter_svg: ^0.17.4

in your pubspec.yaml

like image 140
JideGuru Avatar answered Sep 18 '22 09:09

JideGuru