flutter 医生输出:

[✓] 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!

我的应用程序编译成功,并且我能够使用 flutter run -d Linux 运行它,不会出现任何问题。但是,当我尝试运行直接编译的可执行文件时,这不起作用,在这种情况下我收到错误消息:

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. 

编译命令: flutter 构建 Linux

有什么建议如何让它作为独立应用程序运行吗?

请您参考如下方法:

听起来您正在尝试运行位于构建输出顶层的可执行文件。您需要在构建目录的 bundle 子目录中运行副本,其中所有支持文件都位于正确的相对位置。

一旦 Linux 进一步发展,如何使用构建目录中的内容的详细信息将记录在某处。

Any suggestion how to get it running as standalone app?

bundle 目录作为一个整体是独立的应用程序。如果您的意思是把所有内容都放在一个可执行文件中而不需要任何支持文件,那是不可能的。


评论关闭
IT序号网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!