24

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.

burnsi
  • 6,194
  • 13
  • 17
  • 27
Puneetpal Singh
  • 251
  • 1
  • 1
  • 4
  • 1
    Uninstall/untap dart from brew. Flutter comes packaged with its own version of dart. You do not need to install another version of dart in addition to the one flutter provides for you. – mmcdon20 Feb 04 '23 at 12:02
  • Or do what it says. It depends on which Dart you want to use. – Dave Newton Feb 04 '23 at 12:35

13 Answers13

76

I resolve this warning by just uninstalling the dart sdk using this command -

brew uninstall dart

Since dart sdk already comes with flutter installation, you need not to install it seperately.

Akash Bisariya
  • 3,855
  • 2
  • 30
  • 42
14

SOLVED

when you update your flutter to the latest version this warning comes in your flutter doctor output:-

IMAGE OF WARNING

for solving this just go and open .zshrc and after that check your flutter bin path is like this:-

IMAGE OF PATH

change your path into this:-

IMAGE OF PATH

and then run flutter doctor again... PROBLEM SOLVED ☺️

ERROR SOLVED

Usaid Asif
  • 291
  • 1
  • 8
4

Here a solution:

export PATH="/Users/my_user_name/development/flutter/bin:$PATH"

where "/Users/my_user_name/development/flutter/bin" is in your message from:

flutter doctor

Mattia
  • 344
  • 4
  • 6
2

If you downloaded the flutter-sdk and also installed dart separately, here's the simple answer:

  1. Open your terminal

  2. Type the following, then press 'enter':

    brew uninstall dart
    
  3. Brew will then uninstall dart

  4. Once uninstalled, type the following, then press 'enter':

    flutter doctor -v
    
  5. Flutter Doctor should report back

     No issues found!
    

The Dart SDK is bundled with Flutter, so it isn't necessary to install Dart separately.

Lydia
  • 21
  • 2
1

The Flutter framework also contains Dart. So, if you already installed Dart separately on your OS, remove Dart and its Path from your system. You should have only one Path that is: /Users/puneet/development/flutter/bin

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 18 '23 at 11:07
  • They were asking how to do that and you are only telling what to do here. – Akash Bisariya Feb 24 '23 at 04:32
1

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.

0

Here is how I solve this problem My dart path on environmental variable was look like (Both user and system variable)

C:\src\dart-sdk\bin Now I change it to C:\src\dart-sdk\bin\dart.exe and the problem resolved.

0

It happens because of case sensitive. You can check like that

which flutter

If result is like that /users/***/developments/flutter/bin/flutter"

export path like that

export PATH=/Users/***/developments/flutter/bin:$PATH
0

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!

RaaaCode
  • 447
  • 3
  • 13
0

New name package.. https://formulae.brew.sh/formula/dart-sdk

brew install dart-sdk
0

Simple! Delete dart sdk from C drive and also from Environment Veriable's path, it is done!

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 29 '23 at 21:14
0

this is occuour because you may be use a version manager like fvm. when a FLUTTER_HOME is a simbolic link this warning shows up.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 16 '23 at 10:55
0

For Windows 10 My project was in

C:\Users\Oleksii\AndroidStudioProjects\FlutterProjects\monitoring\flutter enter image description here

I just moved FlutterProjects to flutter folder:

C:\Users\Oleksii\flutter\FlutterProjects\monitoring> enter image description here