运行 Flutter Doctor 后出现 Flutter 错误

问题描述 投票:0回答:2

我使用flutter开发windows桌面程序,我安装了Visual Studio 2019 Enterprise,完全安装,50多G。我刚刚安装了可以更改D盘路径的部分。但执行flutter doctor后,为什么会出现以下提示?

error:

Doctor summary (to see all details, run flutter doctor -v):

    [√] Flutter (Channel dev, 1.23.0-7.0.pre, on Microsoft Windows [Version 10.0.18363.1082], locale zh-CN)
    
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
    
    [!] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.0.0)
    
        X The current Visual Studio installation is incomplete. Please reinstall Visual Studio.
    
    [√] Android Studio (version 4.0)
    
    [!] IntelliJ IDEA Community Edition (version 2019.3)
    
        X Flutter plugin not installed; this adds Flutter specific functionality.
    
        X Dart plugin not installed; this adds Dart specific functionality.
    
    [√] IntelliJ IDEA Ultimate Edition (version 2018.1)
    
    [√] Connected device (1 available)
    
    ! Doctor found issues in 3 categories.
flutter visual-studio-2019
2个回答
0
投票

来自

doctor
的特定错误消息意味着
vswhere
工具针对
isComplete
属性报告错误。这意味着您的 Visual Studio 安装存在问题(或者至少 Microsoft 的工具认为存在问题)。


0
投票

flutter doctor的完整说明说你需要下载Visual Studio(最后一个稳定版本)并安装它。但安装时必须选择以下选项:

使用 C++ 使用这些组件进行桌面开发:

  • MSVC v142 - VS 2019 C++ x64/x86 构建工具(如果有多个可用的构建工具版本,请安装最新的)
  • 适用于 Windows 的 C++ CMake 工具
  • Windows 10 SDK

此后再次运行 flutter doctor 并检查结果。

© www.soinside.com 2019 - 2024. All rights reserved.