Reputation: 895
https://firebase.google.com/codelabs/firebase-get-to-know-flutter#3
dart pub global activate flutterfire_cli
I followed the instructions on the above page and executed the above command. When I did so, I received the following error message.
The current Dart SDK version is 2.10.5.
Because pub global activate depends on flutterfire_cli any which requires SDK version >=2.12.0 <3.0.0, version solving failed.
When I ran flutter upgrade to try it out, I got the following message.
Flutter is already up to date on channel stable
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (5 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1
dart pub global activate flutterfire_cli
I then ran the above command again, but still got the same error message.
What should I do?
Upvotes: 2
Views: 4821
Reputation: 503
It seems you have Dart SDK installed with version 2.10.5 separately from the one that came with flutter(Dart v2.15.1). upgrade the Dart SDK with this commands
(MacOS)
brew upgrade dart
(Windows)
choco upgrade dart-sdk
(Linux)
sudo apt-get install dart
Upvotes: 5