idea flutter dart 代码不跳转 analyze 不起作用
查看本地dart
where dart
/opt/homebrew/bin/dart
/Users/jimogangdan/soft/flutter/bin/dart
两个版本不一样
/opt/homebrew/bin/dart --version
Dart SDK version: 3.1.3 (stable) (Tue Sep 26 14:25:13 2023 +0000) on "macos_arm64"
/Users/jimogangdan/soft/flutter/bin/dart --version
Dart SDK version: 3.3.0-262.0.dev (dev) (Tue Dec 26 16:03:15 2023 -0800) on "macos_arm64"
使用 analyze 测试lib
# 正常
/opt/homebrew/bin/dart analyze lib
# 报错
/Users/jimogangdan/soft/flutter/bin/dart analyze lib
找到问题 开始处理问题
cd /Users/jimogangdan/soft/flutter
git fetch origin
git reset --hard origin/master
git pull
/Users/jimogangdan/soft/flutter/bin/dart fix
# 恢复正常
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/17930607.html