Skip to content

"Could not find Dart in your Flutter SDK" message when PATH contains a bin/flutter wrapper script before the real SDK #5174

@Dieterbe

Description

@Dieterbe

I get this notification when starting vscode.
Yet, flutter doctor shows everything is OK, and the "show log" button also shows a logfile which shows that actually, it can find dart. full log output here: https://gist.github.com/Dieterbe/8dc655aa221d497726018543e8d0a477

Could not find Dart in your Flutter SDK. Please run 'flutter doctor' in the terminal then reload the project once all issues are resolved.

image

the flutter doctor output is this:

[✓] Flutter (Channel stable, 3.22.2, on Arch Linux 6.9.7-arch1-1, locale en_US.utf-8)
    • Flutter version 3.22.2 on channel stable at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (4 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /home/dieter/Android/Sdk
    • Platform android-34, build-tools 33.0.0
    • Java binary at: /opt/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/google-chrome-stable

[✓] Linux toolchain - develop for Linux desktop
    • clang version 17.0.6
    • cmake version 3.29.6
    • ninja version 1.12.1
    • pkg-config version 2.1.1

[✓] Android Studio (version 2022.3)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 76.3.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] Connected device (3 available)
    • Pixel 6 (mobile) • 1A111FDF6007TT • android-arm64  • Android 14 (API 34)
    • Linux (desktop)  • linux          • linux-x64      • Arch Linux 6.9.7-arch1-1
    • Chrome (web)     • chrome         • web-javascript • Google Chrome 126.0.6478.126

[✓] Network resources
    • All expected network resources are available.

• No issues found!
exit code 0

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.

  • Operating System and version: arch linux
  • VS Code version: 1.88.9
  • Dart extension version: v3.92.0
  • Dart/Flutter SDK version: flutter 3.22.2
$ /usr/bin/dart --version
Dart SDK version: 3.4.3 (stable) (Tue Jun 4 19:51:39 2024 +0000) on "linux_x64"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions