Home > database >  Flutter_CLI: Because every version of flutterfire_cli depends on xml >=5.3.0 which requires SDK v
Flutter_CLI: Because every version of flutterfire_cli depends on xml >=5.3.0 which requires SDK v

Time:06-15

I am trying to install firebase_cli for my flutter project, but it tells me:

"Because every version of flutterfire_cli depends on xml >=5.3.0 which requires SDK version >=2.14.0 <3.0.0, flutterfire_cli is forbidden"

Showing that my SDK version is 2.13.4 and it needs 2.14.0 onwards.

I went to flutter console as administrator and run choco upgrade dart-sdk. It told me I now have version v2.17.3.

However, I still get the same problem in flutterfire_cli.

Things I've tried:

  • creating a .bashrc file with the line export PATH="$PATH": "C:\Users\sjrol\OneDrive\Documentos\flutter\.pub-cache\bin" in it (it is the route flutter console told me to save).
  • creating a system environment variable inside PATH that points to my dart folder , with the newer version.
  • In my pubspec.yaml file I've got .

Then rebooted the PC. Same problem. No idea of what's happening.

Dart pub global and choco upgrade results (running the firebase console as administrator):

Flutter doctor (I don't use android studio so no problem, and the android status problem is something I've been facing for a long time and has never given me any problem. Maybe it still has something to do with this?).

I can tell I'm working with the new dart version in my VSCode now, thanks to the new features it has, but firebase still won't let me install CLI. Thank you in advance for your help.

CodePudding user response:

Try this:

  1. Change your sdk version in pubspec.yaml to sdk: ">=2.17.3 <3.0.0"
  2. Run dart --version to make sure the new path is working
  3. Run flutter clean
  4. Run the app
  • Related