DCode
DCode

Reputation: 125

how to fix the flutter doctor issue "'dart' on your path resolves to " Windows pc?

I have upgraded the flutter latest with the command flutter upgrade, after upgrading now flutter doctor shows the warning (below)

Warning: dart on your path resolves to E:\Program Files\Android\dart-sdk\bin\dart.exe, which is not inside your current Flutter SDK checkout at E:\Program Files\Android\flutter. Consider adding E:\Program Files\Android\flutter\bin to the front of your path.

anyone can help me ?

i tried by downloading flutter zip and replace the current flutter folder, but still the same happens !

Upvotes: 5

Views: 22165

Answers (5)

vnsake
vnsake

Reputation: 1

Video https://youtu.be/DRbUrwCxdYc

! Warning: dart on your path resolves to C:\dart-sdk\bin\dart.exe, which is not inside your current Flutter SDK checkout at C:\flutter

It basically says your path different from where path normally supposed to be

  1. Run cmd as Admin run "where dart" if your dart path is different from flutter\bin\cache\dart-sdk\bin (if u have too many dart path)
  2. delete different path dart files This code will fix the problem.

Upvotes: 0

Oleksii Khoroshun
Oleksii Khoroshun

Reputation: 141

For Windows 10 in my case

  • My project was in

    C:\Users\Oleksii\AndroidStudioProjects\FlutterProjects\monitoring\flutter

Android sScreenshot

  • I just moved FlutterProjects to flutter folder:

    C:\Users\Oleksii\flutter\FlutterProjects\monitoring>

Android sScreenshot

Upvotes: 1

mehmet
mehmet

Reputation: 11

If you do environmental and system variables edits and problem still occur. Simple and easy way to solve this problem check the known but actually wrong location of flutter document, there were a 0kb flutter doc for me. I deleted it then everything become well!

Upvotes: 1

Rowan Nasser
Rowan Nasser

Reputation: 31

1- go to E:\Program Files\Android\dart-sdk\bin\dart.exe

2- cut "dart-sdk" folder

3- go to E:\Program Files\Android\flutter\bin

4- then Paste the "dart-sdk" folder inside it

Upvotes: 3

Ali Akber
Ali Akber

Reputation: 532

For Mac and linux users having the same issue, Instead of adding the /path/to/flutter to the end of the $PATH variable add it to the beginning. So it should be PATH="/path/to/flutter:$PATH". See here for explanation.

Upvotes: 6

Related Questions