I’m getting this warning after using "Flutter Doctor" command after the installation of Dart using brew tap dart-lang/dart on MacOS Big Sur
Flutter (Channel stable, 3.7.0, on macOS 11.7.2 20G1020 darwin-x64,
locale
en-GB)
! Warning:dart
on your path resolves to
/usr/local/Cellar/dart/2.19.1/libexec/bin/dart, which is not inside your
current Flutter SDK checkout at /Users/puneet/development/flutter.
Consider adding /Users/puneet/development/flutter/bin to the front of your
path.
Can you anyone tell me how can i resolve this issue?
I’m trying avoid this warning and run a code on android studio developed on flutter framework.
9
Answers
Here is how I solve this problem
My dart path on environmental variable was look like (Both user and system variable)
The
Flutter
framework also containsDart
. So, if you already installedDart
separately on your OS, removeDart
and its Path from your system. You should have only one Path that is:/Users/puneet/development/flutter/bin
I resolve this warning by just uninstalling the dart sdk using this command –
Since dart sdk already comes with flutter installation, you need not to install it seperately.
SOLVED
when you update your flutter to the latest version this warning comes in your flutter doctor output:-
for solving this just go and open .zshrc and after that check your flutter bin path is like this:-
change your path into this:-
and then run flutter doctor again… PROBLEM SOLVED ☺️
Check your environment variable,if dart path exist remove it.
Because dart executable exist in flutter and dart-sdk also.Add only path flutter bin.It work fine for me.
It happens because of case sensitive. You can check like that
If result is like that
/users/***/developments/flutter/bin/flutter"
export path like that
I encountered the same issue.
The problem was that I didn’t realise it was case-sensitive. The path in my .zshrc was in lowercase, but my Development folder started with a capital D.
I changed my folder name from Development to development, and everything worked fine.
I hope this helps!
New name package..
https://formulae.brew.sh/formula/dart-sdk
Here a solution:
export PATH="/Users/puneet/development/flutter/bin:$PATH"
where "/Users/puneet/development/flutter/bin" is in your message from:
flutter doctor