我正在我的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.

当前回答

如果你不止一次安装了Android Studio,命令提示符或PowerShell分配在第一个,也许你正在运行第二个。所以,浏览Android Studio,如果你有多个安装,删除第一个。然后,按照这些步骤在Android Studio中下载插件。

步骤1:Studio—> File—> Settings—> Plugins—> Browse Repositories

第二步:搜索Flutter并下载

步骤3:当你完成后重新启动Android Studio。

其他回答

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

尝试使用以下命令:

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

在Windows上安装它的最好方法

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.20.1, on Microsoft Windows [Version 10.0.18363.959], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.47.3)
[!] Connected device
    ! No devices available

打开Android Studio,菜单文件→设置→插件,确保安装了Flutter和Dart 转到Visual Studio代码扩展,并安装Flutter和Dart扩展

我的机器上安装了IntelliJ IDEA和Android Studio。我删除了IntelliJ IDEA,因为我已经在Android Studio中安装了Dart和Flutter插件。那么颤振医生指令就能完美运行。

问题是安装所需的Flutter和Dart插件。有两种方法可以做到这一点:

进入Android studio→设置→插件→在搜索栏中搜索Flutter和Dart插件。 如果您先安装Flutter,那么Dart可能会自动安装;否则分别安装。 如果您正在使用Visual Studio Code,在活动栏中单击扩展或按Ctrl + Shift + x,在那里您可以搜索Flutter和Dart插件。

现在输入颤振医生

我通过在设置中打开插件来解决这个问题,在“安装”选项卡下,我注意到蓝色文本“插件主页”,这是JetBrains插件的快捷方式。有一个协议,我必须接受,以获得完整的功能。我接受了,我也编辑了我的环境变量通过添加路径到dart-SDK的bin。以前我只把颤振的bin添加到路径中。总之,这解决了我的问题。