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

5

5

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 !

Kruger answered 7/2, 2023 at 12:30 Comment(0)
C
5

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.

Chevaldefrise answered 21/3, 2023 at 7:4 Comment(1)
This answer fixed it for me on MacOSLighten
C
3

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

Cad answered 17/5, 2023 at 17:1 Comment(0)
P
1

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!

Padding answered 22/8, 2023 at 5:51 Comment(0)
C
1

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

Convexity answered 27/8, 2023 at 9:55 Comment(0)
E
0

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.
Ethnocentrism answered 21/9 at 9:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.