首页 > 解决方案 > Flutter 发布到 linux

问题描述

我为 Linux 创建了一个颤振应用程序。但是如何将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   

标签: linuxwindowsubuntuflutterdart

解决方案


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

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

flutter build linux

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


推荐阅读