Home > Net >  Can't pub-get from pubspec.yaml file in Flutter app
Can't pub-get from pubspec.yaml file in Flutter app

Time:04-25

Every time I want to install a package it gives this error, how do I fix it? The error output is below:

The current Dart SDK version is 2.12.3. The current Flutter SDK version is 0.0.0-unknown.

Because image_picker >=0.3.0 requires Flutter SDK version >=0.1.4 and image_picker <0.3.0 requires SDK version >=1.8.0 <2.0.0, image_picker is forbidden. So, because firebase depends on image_picker any, version solving failed. Running "flutter pub get" in firebase... pub get failed (1; So, because firebase depends on image_picker any, version solving failed.)

CodePudding user response:

You check your flutter version and check that dependency version and change the dependency version otherwise remove the version.

CodePudding user response:

You have to either:

  1. Downgrade the version of image_picker to match the flutter SDK version you currently use, or
  2. Upgrade your flutter SDK version to a version above or equal to 1.8.0. (preferred solution).
  • Related