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

当前回答

我也有同样的问题,但我自己解决不了。

然而,通过使用Visual Studio Code,它可以很好地工作。这个错误无关紧要。

其他回答

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

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

尝试使用以下命令:

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

Mac安全修复(Android Studio 4.1+)。它现在在不同的目录中,但是符号链接有帮助。

在终端上运行这个命令:

ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1

如果您有不同的Android Studio版本或安装文件夹,请相应地调整该命令。

我通过从插件中卸载Flutter解决了这个问题。重新启动Android Studio后,我打开了插件,然后它显示我的Dart插件与我的Android Studio (v3.6)不兼容。

我更新了Dart,重启了Android Studio,然后重新安装了Flutter。在那之后,我必须为Flutter和voilà设置SDK路径,现在一切都可以工作:D

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

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

第二步:搜索Flutter并下载

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