我正在我的Linux Ubuntu 16.04 (Xenial Xerus)系统上配置Flutter SDK。为什么在运行颤振诊断程序时出现以下错误?

我已经在.bashrc文件中为flutter和dart指定了path,但是当我运行flutter doctor时,我得到了这个错误:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.5.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
[✓] Android Studio (version 3.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Community Edition (version 2018.2)
[!] VS Code (version 1.25.1)
[!] Connected devices
    ! No devices available

! Doctor found issues in 2 categories.

当前回答

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.9.4, on Linux, locale en_IN)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
[✓] Android Studio (version 3.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected devices
    ! No devices available

一个对我有效的解决方案:

只需要安装插件。 Android Studio→菜单文件→设置→插件→浏览存储库 搜索“颤振”。 点击安装(会弹出一个关于Dart依赖的对话框。单击Yes)。 安装完成后,重新启动Android Studio。

现在跑扑医生:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.9.4, on Linux, locale en_IN)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
[✓] Android Studio (version 3.1)
[!] Connected devices
    ! No devices available

androidflutterdartflutter-doctor

其他回答

当我拥有多个版本的Android Studio时,我就遇到了这个问题,但它看起来并没有多个版本。但你确实使用IntelliJ IDEA社区版,所以你确定你在Android Studio中安装了插件吗?

你必须在Visual Studio代码和Android Studio上安装Flutter和Dart !

尝试使用以下命令:

Flutter doctor—android-licenses,并按y安装所有许可证。

我也面临着这些问题,并找到了这些解决方案。

你必须从市场安装“Flutter”和“Dart”插件。

Windows操作系统:Android Studio→菜单文件→设置→插件→搜索“flutter”和“dart”并安装。确保你拿到了这个。

现在,确保您已经为两者设置了SDK路径 现在享受新鲜的颤振吧

哦,只需输入flutter upgrade就可以升级到新版本。

只需更新Flutter SDK使用

颤振升级

它解决了我所有的问题。

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.5.0, on Microsoft Windows [Version 10.0.19043.1110], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.2)
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2020.2)
[√] VS Code (version 1.60.0)
[√] Connected device (3 available)

我也有同样的问题,但我在运行这些命令后修复了它:

flutter channel dev
flutter doctor
flutter channel master
flutter doctor