更新Android studio至4.1.1之后,执行flutter doctor,尽管在Android studio中已经安装了flutter plugin 和 dart plugin,仍然会报错未安装(无法找到)
Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B29 darwin-x64, locale
zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)
主要原因就是在Android studio 4.1中plugin目录发生了变化,可以用下面的指令软链接一下目录:
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1