2

I want to change my sdk version from 2.16.2 to 2.17.1 while I'm using android studio (for a single project only)

could someone please help me with this issue?

Thanks

1
  • what is your flutter version? Commented Jun 30, 2022 at 7:03

4 Answers 4

1

From File>Settings>Languages&Frameworks>Dart,

  1. Check box - Enable Dart support for the project,
  2. Specify - Dart SDK path enter image description here
Sign up to request clarification or add additional context in comments.

2 Comments

thanks, but will this be only for a single project or the whole android studio's SDK will change?
only for a single project, sdk of other projects doesn't change, I tried
1

Download the respective Dart package( https://dart.dev/get-dart/archive ) or the Flutter SDK (https://docs.flutter.dev/development/tools/sdk/releases) [in your case version 3.0.1) from the archive for your operating system.

Once downloaded, open your project in Android Studio and go to

In Windows

File > Settings > Languages & Frameworks > Flutter

In Mac

Preferences > Languages & Frameworks > Flutter

Change the path of Flutter SDK to the downloaded one. Or you can do the same for the Dart option in the same settings pane.

But always keep in mind that to change the Dart version which is compatible with the flutter version. So it is better to change the Flutter SDK path rather than Dart.

Once everything is done, restart the IDE.

Note: This method will only apply the changed version for the current project alone. Not even the terminal for the project won't be reflected, as the path would have been set for some other versions.

Comments

1

In Android studio : Go to settings => plugin => dart (update dart)

And In terminal use command : flutter upgrade

1 Comment

both actions will result in the latest version whereas he needs an older version.
0

I'd use fvm to manage the flutter versions of the projects that need to be pinned to something before stable. You'll have to figure out which Dart is in each Flutter release, but that's a minor issue.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.