Flutter not compiling in Ubuntu 22.04 & derivatives

I confirm after I upgraded to Ubuntu 22.04 I’m having the same exact issue, although “flutter doctor -v” reports everything is perfect:

flutter doctor -v [✓] Flutter (Channel stable, 3.0.0, on Ubuntu 22.04 LTS 5.15.0-27-generic, locale en_US.UTF-8) • Flutter version 3.0.0 at /home/aboubakr/snap/flutter/common/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ee4e09cce0 (2 days ago), 2022-05-09 16:45:18 -0700 • Engine revision d1b9a6938a • Dart version 2.17.0 • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /home/aboubakr/Android/Sdk • Platform android-32, build-tools 32.1.0-rc1 • Java binary at: /home/aboubakr/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8512546/jre/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.

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

[✓] Linux toolchain - develop for Linux desktop • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) • cmake version 3.10.2 • ninja version 1.8.2 • pkg-config version 0.29.1

[✓] Android Studio (version 2021.2) • Android Studio at /home/aboubakr/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8512546 • Flutter plugin can be installed from: :hammer: ://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: :hammer: ://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.1) • IntelliJ at /home/aboubakr/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/221.5591.52 • Flutter plugin version 67.1.4 • Dart plugin version 221.5591.52

[✓] VS Code (version 1.64.2) • VS Code at /usr/share/code • Flutter extension can be installed from: :hammer: //marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available) • Linux (desktop) • linux • linux-x64 • Ubuntu 22.04 LTS 5.15.0-27-generic • Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.75

[✓] HTTP Host Availability • All required HTTP hosts are available

• No issues found!