flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.97k stars 317 forks source link

Incompatibility with WSL2 #7460

Open alihoseiny opened 4 months ago

alihoseiny commented 4 months ago

The plugin is unable to find and work with flutter sdk on the WSL2.

Steps to Reproduce

After installing flutter SDK on the WSL2 and making sure that it is working using flutter doctor command and build commands, After adding the bin path to the "Flutter SDK path", it shows following error: "Cannot Save Settings: Flutter SDK is not found in the specified location".

Version info

[✓] Flutter (Channel stable, 3.22.1, on Ubuntu 22.04.4 LTS 5.15.146.1-microsoft-standard-WSL2, locale C.UTF-8)
    • Flutter version 3.22.1 on channel stable at /usr/bin/flutter-sdk
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (6 days ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✗] Linux toolchain - develop for Linux desktop
    ✗ clang++ is required for Linux development.
      It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
    • pkg-config version 0.29.2
    ✗ GTK 3.0 development libraries are required for Linux development.
      They are likely available from your distribution (e.g.: apt install libgtk-3-dev)

[!] 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).

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 22.04.4 LTS 5.15.146.1-microsoft-standard-WSL2
    • Chrome (web)    • chrome • web-javascript • Google Chrome 125.0.6422.60

[✓] Network resources
    • All expected network resources are available.
rekire commented 4 months ago

Based on https://github.com/flutter/flutter/issues/142619 my guess is WSL2 is not supported and it is not planned to add the support.