简体   繁体   中英

I did update flutter 3.7 and flutter doctor

I can build flutter project. but I did catch warning by flutter doctor

I want fix.

warning code

[!] Flutter (Channel stable, 3.7.0, on macOS 13.0.1 22A400 darwin-arm64, locale ja-JP)

! Warning: `dart` on your path resolves to 
 /opt/homebrew/Cellar/dart/2.14.4/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/t/Developer/flutter. 

Consider adding
      /Users/t/Developer/flutter/bin to the front of your path.

tried

set -x PATH ~/development/flutter/bin $PATH

fltter clean

I solved it by adding the dart/ directory inside flutter/bin directory.

Hope this might help: :D

Important note from flutter documentation :

The Flutter SDK contains the dart command alongside the flutter command so that you can more easily run Dart command-line programs. Downloading the Flutter SDK also downloads the compatible version of Dart, but if you've downloaded the Dart SDK separately, make sure that the Flutter version of dart is first in your path, as the two versions might not be compatible.

The previous text means that flutter SDK has Dart SDK inside it, So you don't need to download dart separately.

To solve this proplem:

  1. Delete the dart SDK that you download separately.

  2. Go to the environment variables then select the Path from the user variables .

  3. Change C:\src\dart-sdk\bin to C:\src\flutter\bin\dart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM