Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter binary and Dart binary path problem

Tags:

flutter

Currently in the process of installing everything related to Flutter (VS, VS Code, Extensions...) and went into a problem.

I am following this Help Document; but seem to have encountered a problem.

While doing Step 3 (Validating VS Code Setup), I type in "doctor" in VS Code Command Palette, and I see 2 errors in the output, saying that Flutter binary and Dart binary is not on my path.

It says "consider adding XXX to your path", but it didn't do anything when adding exactly this in the "Environment Variables Path" In my windows. Is that the path they're talking about ? enter image description here

Tried adding directory they recommended me to add, to my Environment Variables, under the "Path" button, didn't change anything. Was that the right place to put this directory ?

like image 497
Henri Pitre Avatar asked Jun 25 '26 17:06

Henri Pitre


2 Answers

Add dart-sdk to PATH variable of User Variables and System Variables both, along with flutter\bin path.

So, your flutter path is:

C:\Users\ASUS\Documents\flutter\bin

Make sure you have added this above path to both User Variables and System Variables.

Now, add dart-sdk path which is inside flutter\bin, so it will be:

C:\Users\ASUS\Documents\flutter\bin\cache\dart-sdk

Now, add this, above path to both User Variables and System Variables.

Now, try to run:

flutter doctor
like image 132
Tushar Asodariya Avatar answered Jun 28 '26 12:06

Tushar Asodariya


If you happen to be using ubuntu (I am on ubuntu 24.04) and encounter a similar problem try updating your .bash_profile to use export PATH="$HOME/development/flutter/bin:$PATH" instead of export PATH="~/development/flutter/bin:$PATH" as recommended by the flutter website. Please not that this assumes that you will have followed the instructions listed on the website https://docs.flutter.dev/get-started/install/linux/android

like image 40
Kthree Avatar answered Jun 28 '26 12:06

Kthree