My flutter app builds and runs just fine, but I cannot run it in debug mode. Below is the error I get:
Unable to start executable "build/linux/x64/debug/bundle/polls": ProcessException: Failed to find "build/linux/x64/debug/bundle/polls" in the search path.
Command: build/linux/x64/debug/bundle/polls
ProcessException: Failed to find "build/linux/x64/debug/bundle/polls" in the search path.
Command: build/linux/x64/debug/bundle/polls
The app name I am working on is called polls, and when I look into the directories, the build/linux/x64/release directory has a directory called bundle with the compiled binary, but the build/linux/x64/debug doesn't have the bundle directory.
How do I make flutter run -d linux create the missing directory when compiling the debug version?
My environment configurations are as shown below:
[✓] Flutter (Channel stable, 3.0.1, on Linux Mint 20.3 5.4.0-110-generic, locale en_GB.UTF-8)
• Flutter version 3.0.1 at /usr/local/src/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fb57da5f94 (11 days ago), 2022-05-19 15:50:29 -0700
• Engine revision caaafc5604
• Dart version 2.17.1
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /home/arthur/Android/Sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at: /usr/local/src/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] 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 (version 2021.1)
• Android Studio at /usr/local/src/android-studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin version 211.7817
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
[✓] VS Code (version 1.67.2)
• VS Code at /usr/share/code
• Flutter extension version 3.40.0
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Linux Mint 20.3 5.4.0-110-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.61
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
I just ran into a similar issue, where a sample flutter app, that I created via Visual Studio Code, was unable to find bundle in the path.
As a test, in a completely different directory, from a terminal outside of Visual Studio Code, I ran
flutter create startup_namer
and was able to successfully invokeflutter run -d linux
on it.