Kashif Mohammad
Kashif Mohammad

Reputation: 73

Android studio reporting older dart-sdk version

I have updated flutter and dart to latest version. dart --version shows following output: Dart SDK version: 2.14.4 (stable) (Wed Oct 13 11:11:32 2021 +0200) on "windows_x64"

Yet while running pub.get in android studio reports error with older version of dart-sdk enter image description here

Here is a portion of my pubspec.yaml: enter image description here How to resolve this?

Upvotes: 4

Views: 1901

Answers (3)

Zia Afridi
Zia Afridi

Reputation: 21

In my case I had upgraded to new flutter version by command it did but I had more than one sdks the issue is to solve you have to replace the sdks path in android studio (languages and frameworks) of flutter and dart both to newer version, to find new version simply command in terminal (which flutter or which dart) on your preferences.

Upvotes: 2

Can Tomris
Can Tomris

Reputation: 41

It means that your Dart SDK version does not match the Firebase minimum required version. You can try to update your SDK or the longer and more stable option is checking all the minSdkVersions if they are under the required version or not.

You can simply search in project "minSdkVersion" and if you see flutter.minSdkVersion or something like this, manually change the version the one you need. Like 10 or something you need.

And try not to forget to upgrade newest Flutter version. This way you can never be under the required minSdkVersions.

Upvotes: 0

Marko
Marko

Reputation: 71

Go to your Android Studio settings and search for Dart SDK path and change it to the location your updated Flutter is.

Also, make sure you don't have multiple Flutter versions installed on your system.

Upvotes: 1

Related Questions