🛠️ Fixing "Dart SDK is not configured" in Android Studio After Cloning a Flutter Project
If you're working on a Flutter project and just cloned it from GitHub, there's a good chance you've come across this frustrating message in Android Studio:
"Dart SDK is not configured"
Don't worry — this is a common issue, especially when opening a Flutter project for the first time on a new machine or after cloning it without IDE settings included.
Let’s walk through why this happens and how to fix it step by step.
🧩 Why does this happen?
There are two main reasons:
-
Flutter/Dart SDK path is not recognized by Android Studio
This usually happens if:-
You cloned the project from GitHub, and
-
It didn’t include
.idea/
or.iml
files that define your local environment setup.
-
-
Flutter or Dart plugin is missing or disabled
If the IDE can’t recognize these SDKs, it's often because the required plugins aren't installed.
✅ How to fix it (Step by Step)
1️⃣ Check if Flutter & Dart plugins are installed
Go to:
Android Studio → Preferences → Plugins
-
Make sure both Flutter and Dart plugins are installed.
-
If not, search and install them.
-
Restart Android Studio after installation.
2️⃣ Set the Flutter SDK path
Now go to:
Preferences → Languages & Frameworks → Flutter
-
In the Flutter SDK Path field, set the path where you installed Flutter.
For example:
Don’t have Flutter installed?
Run this in your terminal to clone the stable version:
Then point Android Studio to the folder you just cloned (e.g. /Users/raho/flutter
).
3️⃣ Dart SDK will be detected automatically
Good news: once the Flutter SDK is configured correctly, Android Studio will automatically detect Dart SDK since it’s bundled with Flutter.
No need to set it manually.
4️⃣ Refresh your project structure
Sometimes Android Studio might still be a little confused.
If that happens:
-
Go to File > Invalidate Caches / Restart
-
Or close the project and reopen it using File > Open
This clears outdated settings and reloads everything.
🔁 Will I have to do this every time?
Nope!
Once you configure the Flutter SDK on your Mac, Android Studio will remember it for future projects — as long as the SDK path stays the same.
However, you may need to repeat these steps if:
-
You open the project on a different machine, or
-
The project was cloned without IDE settings like
.idea
or.iml
.
0 Comments