skip to Main Content

I opened VSCode a few days ago to continue work on a Flutter project, unfortunately, the Flutter and Dart usually take a while to start(2-3 minutes), but this time,the extensions failed to initialize, and I’m left with white colourless code and no access to the tools that come with the extensions(i.e F5 for debug).screenshot of the current state of things

Over the past few days, I have,

  • Deleted and re-installed the Flutter SDK(forgive me, I cant remember what version it was at before, but now its 3.3.7, Dart 2.18.4)

  • Deleted and re-installed VSCode(used to be a snap, now a .deb)

  • Uninstalled and re-installed the Flutter and Dart extensions(multiple times, restarted VSCode each time)

– Ran said project directly from the terminal to be sure I had the flutter tool correctly installed(flutter run and flutter build apk ran fine, with no errors)

Please find the results of ‘flutter doctor -v’ below

 Flutter (Channel stable, 3.3.7, on Ubuntu 20.04.5 LTS 5.15.0-52-generic,
    locale en_NG)
    • Flutter version 3.3.7 on channel stable at
      /home/alabi/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e99c9c7cd9 (7 days ago), 2022-11-01 16:59:00 -0700
    • Engine revision 857bd6b74c
    • Dart version 2.18.4
    • DevTools version 2.15.0

[!] Android toolchain - develop for Android devices (Android SDK version
    32.1.0-rc1)
    • Android SDK at /home/alabi/Android/Sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • ANDROID_SDK_ROOT = /home/alabi/Android/Sdk
    • Java binary at: /home/alabi/.jdks/openjdk-18.0.1.1/bin/java
    • Java version OpenJDK Runtime Environment (build 18.0.1.1+2-6)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for
      more details.

[✗] Chrome - develop for the web (Cannot find Chrome executable at
    google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup
      for detailed instructions).

[✓] VS Code (version 1.73.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.52.0

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Ubuntu 20.04.5 LTS 5.15.0-52-generic

The CLI command, ‘flutter –version’ returns

Flutter 3.3.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e99c9c7cd9 (7 days ago) • 2022-11-01 16:59:00 -0700
Engine • revision 857bd6b74c
Tools • Dart 2.18.4 • DevTools 2.15.0

All of this leads me to believe the Flutter SDK is installed correctly and the problem is with VSCode and the extensions

Any help is appreciated, thank you!

2

Answers


  1. Chosen as BEST ANSWER

    Fixed!

    If something in the extension is corrupt you could try uninstalling the extensions and then deleting them from ~/.vscode/extensions (the ones starting dart-code) and then reinstall.

    From DartCode's GitHub, read the issue and fix here if you're still confused


  2. Make sure that you use official extensions for Flutter/Dart. They are created by Dart Code.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search