Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package requires Flutter SDK Version >=0.1.4 <2.0.0

I'm trying to add the path_provider package in my dependencies, but i always get this error:

The current Flutter SDK version is 0.0.0-unknown.


Because lista_tarefas depends on path_provider >=0.4.0 which requires Flutter SDK version >=0.1.4 <2.0.0, version solving failed.

pub upgrade failed (1)

I've already tried:

  • packages get
  • packages upgrade
  • flutter upgrade
  • flutter clean
  • Write other version in enviroment variable in pugspec.yaml
  • Delete enviroment variable in pugspec.yaml
  • Use an older version of path_provider
  • Invalidating caches in Android Studio

My current pubspec.yaml file:

...

version: 1.0.0+1

environment:
  sdk: ">=2.0.0-dev.68.0 <3.0.0"



dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  path_provider: "^0.4.1"

dev_dependencies:
  flutter_test:
    sdk: flutter


# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

Path_provider doc: https://pub.dartlang.org/packages/path_provider

like image 559
Lívia Castilholi Santiago Avatar asked Nov 17 '22 20:11

Lívia Castilholi Santiago


1 Answers

I got the same problem . I solved it by ,going to the '.git' folder in your flutter SDK path and delete the config file.

like image 104
prabhu r Avatar answered Nov 19 '22 08:11

prabhu r