skip to Main Content

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 FilesAndroiddart-sdkbindart.exe, which is not inside your current Flutter SDK checkout at E:Program FilesAndroidflutter. Consider adding E:Program FilesAndroidflutterbin 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 !

2

Answers


  1. You can resolve this warning by adding the Flutter SDK’s bin directory to the front of your PATH environment variable. Here’s how you can do it in Windows:

    • Open the Start menu and search for "Environment Variables" or "Edit
      environment variables for your account".
    • Click on "Edit the system environment variables".
    • Click on the "Environment Variables" button.
    • Scroll down to the "System variables" section, find the "Path"
      variable, and click on "Edit".
    • Add the path to the Flutter SDK’s bin directory (e.g. C:Program
      FilesAndroidflutterbin) to the front of the PATH.
    • Restart your terminal to pick up the changes.

    After adding the Flutter SDK’s bin directory to the front of the PATH, you should no longer see the warning message when you run flutter doctor.

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search