Muhammed Ramadan
Muhammed Ramadan

Reputation: 37

How to change used Dart version in Android Studio?

So I am trying to run this command in terminal

flutter pub run intl_translation:extract_to_arb --output-dir=lib/i18n lib/i18n/app_localization.dart

and I get this error

Dart 2.15.1 is incompatible with your dependencies' SDK constraints. Please run "flutter pub get" again.
pub finished with exit code 65

And I noticed that the used Dart version is 2.15.1 and not version 2.10.5 which is specified in the Android Studio project settings

Screenshot of the Android Studio project settings and dart version specified in it

How would I change the actually used Dart version to be able to run the intl_translation command ?

Upvotes: 0

Views: 1952

Answers (2)

Muhammed Ramadan
Muhammed Ramadan

Reputation: 37

From SDK manager in android studio you can change the flutter SDK and dart SDK to the path of the versions you want to use. And then restart IDE

Upvotes: 0

Salih Can
Salih Can

Reputation: 1801

You can download the version you want from this link. https://dart.dev/get-dart/archive

Upvotes: 1

Related Questions