For Windows/Linux: Go to File->Settings->Language & Framework->Dart. For Mac: Click Android Studio on top -> Preferences -> Languages & Framework -> Dart.
For windows open Command Prompt and for Mac/Linux open the terminal and type the following command: dart –version. It will show the installed version and path.
I had the same problem after importing a flutter project from git. These are the steps to solve the problem.
This solved the issues for me.
It usually happens with projects that were created in other machines. To fix this on Android Studio 3.1.3:
Edit 2019-05-28 - I don't know how long this option is enabled but I have noticed that in Android Studio 3.4 it's easier to Enable Dart Support in projects that were developed in other machines.
I had the same Dart SDK issue and I used this for my solution. To remedy the issue without having to use the terminal to test my programs each time the steps I followed are as follows.
flutter
SDK path. I did so by typing in echo $PATH
and finding the path with /flutter/bin..../flutter/bin
just add on /cache/dart-sdk/bin
making it .../flutter/bin/cache/dart-sdk/bin
..../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.Languages and Frameworks>Dart
.I went through these steps using IntelliJ IDEA so they should be pretty much the same. If that didn't work, sometimes making a dummy Dart project can get things working again. That fixed a similar issue for me.
In my machine, flutter was installed in
C:\src\flutter
I set dart sdk path as
C:\src\flutter\bin\cache\dart-sdk
This solved my problem
In case other answers didn't work for you
If you are using *nixOS or Mac
which flutter
. You'll get something like /Users/mac/development/flutter/bin/flutter
under that directory go to cache
folder here you will find either dart-sdk or (and) dart-sdk.old folder. Copy their paths.ctrl+alt+s
or cmd+,
on mac. Under
Language & Frameworks choose Dart
find Dart SDK path
. Put that
path you've copied at first step to there. Click Apply.If this didn't solve the issue you have to also set the Flutter SDK path
Language & Frameworks choose Flutter
and find Flutter SDK path
field.which flutter
command gave to you. Set it to the field you've found in step 1 of this header. Again click Apply & click save or ok.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With