2

Flutter doctor output:

[✓] Flutter (Channel master, 1.19.0-2.0.pre.193, on Linux, locale pl_PL.UTF-8)
     Flutter version 1.19.0-2.0.pre.193 at /home/michal/android/flutter
     Framework revision fed18fc433 (3 hours ago), 2020-05-29 03:43:01 -0400
     Engine revision 17737e6fd4
     Dart version 2.9.0 (build 2.9.0-11.0.dev 6489a0c68d)

[✓] Android toolchain - develop for Android devices (Android SDK version
    29.0.0-rc2)
     Android SDK at /home/michal/Android/Sdk
     Platform android-29, build-tools 29.0.0-rc2
     ANDROID_HOME = /home/michal/Android/Sdk
     Java binary at: /home/michal/android/studio/jre/bin/java
     Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
     All Android licenses accepted.

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

[✓] Linux toolchain - develop for Linux desktop
     clang version 9.0.1-12
     cmake version 3.16.3
     ninja version 1.10.0

[✓] Android Studio (version 3.6)
     Android Studio at /home/michal/android/studio
     Flutter plugin version 45.1.1
     Dart plugin version 192.8052
     Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.45.1)
     VS Code at /usr/share/code
     Flutter extension version 3.8.1

[✓] Connected device (4 available)
     Android SDK built for x86 64 • emulator-5554 • android-x64    • Android 10
      (API 29) (emulator)
     Linux                        • Linux         • linux-x64      • Linux
     Web Server                   • web-server    • web-javascript • Flutter
      Tools
     Chrome                       • chrome        • web-javascript • Google
      Chrome 84.0.4147.21 dev

• No issues found!

My app compiles succesfully and I am able to run it without any issues with flutter run -d Linux. However, that does not work when I try to run directly compiled executable, in this case I'm getting error message:

embedder.cc (781): 'FlutterEngineInitialize' returned 'kInvalidArguments'. Not running in AOT mode but could not resolve the kernel binary.
Failed to start Flutter engine: error 2
Failed to create window.

Command to compile: flutter build linux

Any suggestion how to get it running as standalone app?

3
  • what is the command you used for generating the executable? Commented May 29, 2020 at 10:57
  • Question updated Commented May 29, 2020 at 10:59
  • from the documentation Building In addition to linking the Flutter library, your application will need to bundle your Flutter assets (as created by flutter build bundle). On Windows and Linux you will also need the ICU data from the Flutter engine (look for icudtl.dat under the bin/cache/artifacts/engine directory in your Flutter tree). Commented May 29, 2020 at 11:19

1 Answer 1

5

It sounds like you are trying to run the executable that's at the top level of the build output. You need to instead run the copy in the bundle subdirectory of the build directory, which has all the supporting files in the correct relative locations.

Once Linux is further along, details of how to use what's in the build directory will be documented somewhere.

Any suggestion how to get it running as standalone app?

The bundle directory as a whole is the standalone app. If you mean having everything in a single executable file without any supporting files needed, that's not possible.

Sign up to request clarification or add additional context in comments.

1 Comment

You are right. I missed that, because on Windows there's no 'bundle' directory, so I wrongly assumed Linux executable is top level too

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.