简体   繁体   中英

Flutter release to linux

I have created a flutter app for Linux. but how to release flutter to Linux or 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   

This is an official guide how to build and release production Flutter desktop app to Linux Snap Store: https://flutter.dev/docs/deployment/linux

If you just want to build eg Linux version and run it locally then try this:

flutter build linux

You'll find the executable in build/linux/release/bundle directory

Use the command flutter build linux or windows and after the process finishes. You will find the files in build folder if you are building linux then you found a linux folder and same as windows But remember both linux and windows are in developer preview so don't use it for production application.

To publish flutter for Linux you must have a system with Linux operating system. If you want to release for MAC, then you must have a MAC device. As the same for windows, you must have a windows os. So for Linux application publishing - you must have to make sure that your operating system is Linux. Then you can build for Linux.

The building command is:

flutter build linux

#edited

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM