Flutter 发布到 Linux

Ahm*_*yri 4 linux windows ubuntu dart flutter

我为 Linux 创建了一个 flutter 应用程序。但如何将flutter发布到Linux或windows上呢?

You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
    To generate an app bundle, run:
        flutter build appbundle --target-platform android-arm,android-arm64,android-x64
        Learn more on: https://developer.android.com/guide/app-bundle
    To split the APKs per ABI, run:
        flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done   
Run Code Online (Sandbox Code Playgroud)

tom*_*ozb 9

这是如何构建 Flutter 桌面应用并将其发布到 Linux Snap Store 的官方指南:https://flutter.dev/docs/deployment/linux

如果您只想构建例如 Linux 版本并在本地运行它,请尝试以下操作:

flutter build linux
Run Code Online (Sandbox Code Playgroud)

build/linux/release/bundle您将在目录中找到可执行文件