我有一个问题,在Flutter改变路径 dart sdk

1sbrub3j  于 2023-02-20  发布在  Flutter
关注(0)|答案(1)|浏览(484)

一开始,一切都很好。当我下载Dart SDK时,我遇到了这个问题:

Flutter (Channel stable, 3.7.3, on macOS 13.2.1 22D68 darwin-arm64
    (Rosetta), locale en-SA)
    • Flutter version 3.7.3 on channel stable at /Users/waleed/flutter
    ! Warning: `dart` on your path resolves to
      /usr/local/Cellar/dart/2.19.2/libexec/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/waleed/flutter. Consider adding
      /Users/waleed/flutter/bin to the front of your path.

我改变了路径,但似乎没有解决问题。

y1aodyip

y1aodyip1#

我猜是Dart的安装路径有问题。试着在系统的PATH环境变量前面添加Flutter SDK的bin目录的正确路径。
将以下行添加到文件末尾,将路径替换为Flutter SDK目录的实际路径:

export PATH="$PATH:/Users/waleed/flutter/bin"

在你的.bash_profile

相关问题