Answer a question

I just installed flutter on my Windows 10 system. I had Visual Studio Code v1.26.1 installed previously on my system. But whenever I run flutter doctor from the Git Bash, I notice VS Code is not detected by the Flutter Doc. So whenever I type the command in Git bash:

    $ flutter doctor

The outputs that I get is:

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel beta, v0.6.0, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
    [√] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    [√] Android Studio (version 3.1)
    [!] Connected devices
        ! No devices available

    ! Doctor found issues in 1 category.        

But if Flutter detects VS Code, the desired outputs that I have observed in other systems in online Flutter Installation Guidelines, is: Doctor summary (to see all details, run flutter doctor -v):

    [√] Flutter (Channel beta, v0.6.0, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
    [√] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    [√] Android Studio (version 3.1)
    [√] VS Code, 64-bit edition (version <--the installed version-->)
    [!] Connected devices
        ! No devices available

    ! Doctor found issues in 1 category.        

I know the devices issue is showing as I haven't connected any android device neither running any emulator. But cannot figure out why VS Code is not being detected by flutter doc. I am a newbie to flutter so I am not sure either if it's okay if VS Code isn't shown here.

Answers

This will happen if:

  • You have installed VS Code in a non-default location
  • You have installed the newer "User Level" installation of VS Code

The first one is expected - we don't go looking for VS Code, we only check the default install locations.

The second one has been fixed in latest Flutter code (https://github.com/flutter/flutter/pull/21070) but is likely not in the version you have yet. In this case, it'll start appearing in a future update.

I am not sure either if it's okay if VS Code isn't shown here

It's absolutely okay - all this does is a basic check for VS Code and the extension as a hint to those that may use VS Code and not realise there's a VS Code extension. Not showing in Doctor will have no impact on the use of VS Code or the extension at all.

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐