When users installing setting up stuff to get started with Flutter Development a common problem they face is like “Dart SDK is not configured“. so today we will go through How to Solve Dart SDK is not Configured in Flutter??
How to Solve Dart SDK is not Configured in Flutter??
These are the steps to solve the problem.
- File->Settings->Language & Framework->Flutter
- Choose the Flutter SDK path: the first time we install Flutter, we choose the location where the flutter should be installed. Choose this location.
- Click OK and the android studio will refresh. Carry on if the problem is solved.
- If you are still stuck with the error.
- Goto this link and install Dart.
- Goto the same place in settings, ..Language & Framework->Dart and chose the SDK location.
It usually happens with projects that were created in other machines. To fix this on Android Studio 3.1.3 follow the below steps.
- File-> Settings (ctrl+alt+s)
- Languages and Frameworks -> Dart
- Check “Enable Dart support for the project…”
- In “Dart SDK path” click in “…” and navigate to the Flutter SDK directory. Under that directory, you’ll find “bin/cache/dart-sdk”. This is the Dart SDK path you should use.
- Click “Apply“
- Close the project and open it again sometimes you need this step, sometimes doesn’t.
Android Studio 3.4 it’s easier to Enable Dart Support in projects that were developed in other machines.
- File -> Sync Project With Gradle Files
- After it builds, click in “Enable dart support” at the top of the editor panel.
Users can also follow the steps like below:
- Find the Flutter SDK path. I did so by typing in echo $PATH and finding the path with /flutter/bin.
- Assuming your path is something like …/flutter/bin just add on /cache/dart-sdk/bin making it …/flutter/bin/cache/dart-sdk/bin.
- This …/flutter/bin/cache/dart-sdk/bin is the location of your Dart SDK. Assuming you say the same Dart SDK is not configured error accompanied by something where you can configure your Dart SDK. You click the configure option and set …/flutter/bin/cache/dart-sdk as your SDK. That should fix your problem. If not head over to the next step.
- Open your Android Studio preferences(Command + ‘,’) and go to Languages and Frameworks>Dart.
- Under the Dart menu, you should be able to enter your Dart SDK path.
Flutter is usually installed in the below path.
DART SDK can be found at below path:
While if you are a Win10 Pro user you can try the below things:
- Go to File/Settings or Ctrl+Alt+S to bring up the settings window.
- Go down to ‘Language & Frameworks and click on Dart
- Check Enable Dart support for the project ‘YOUR_PROJECT_NAME’
- For the Path Dart SDK path: enter the location where you are storing the flutter directory.
- Drill down that directory till you see the Dart SDK directory C:\flutter\bin\cache\dart-sdk. You can also Check SDK update by checking the box and clicking on Check now to get the latest version.
Click Android Studio on top -> Click on Preferences -> Languages & Framework-> Select Flutter -> Browse Flutter SDK Path you have download link [“https://flutter.dev/docs/get-started/install/macos”] -> Click OK ENJOY!!!!!
Follow the below 2 Steps Which can help you to resolve this issue.
1. Install the IntelliJ Flutter plugin:
- Ctrl + Shift + a (Open Actions)
- Type in search ‘Flutter’ hit enter Install and restart IntelliJ
2. Configure Flutter Plugin:
- Ctrl + Alt + s (Open Settings)
- Type in search ‘Flutter’, Select option under Language & Frameworks
- Open terminal which Flutter output PATH_TO_FLUTTER/bin/flutter you ONLY NEED the PATH_TO_FLUTTER so remove everything from /bin…
- Paste the location on the Flutter SDK path input and apply.
That will then ask you to restart IntelliJ and you should get both Flutter and Dart configured.
You can try the below things.
$ echo "$(dirname $(which flutter))/cache/dart-sdk"
You’ll get something like:
Enter that value as your Dart SDK path.
In this article, we have been through How to Solve Dart SDK is not configured in Flutter??
Thanks for Reading.
Do let us know if you need any assistance with Flutter Design & Flutter Development?
We would love to assist you with the same.
FlutterAgency.com is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc.
FlutterAgency.com is one of the most popular online portal dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge on Flutter.