Open In App

How to Build and Release Flutter Application in Android Device?

Flutter is Google’s Mobile SDK to build native iOS and Android, Desktop (Windows, Linux, macOS), Web apps from a single codebase. When building applications with Flutter everything towards Widgets – the blocks with which the flutter apps are built. They are structural elements that ship with a bunch of material design-specific functionalities and new widgets can be composed out of existing ones too. The process of composing widgets together is called composition. In this article, we are going to learn How to Build and Release a Flutter Application on Android Device. We have 2 potential release formats once the app is ready for publication to the Play Store.

  1. App Bundle
  2. APK

Build App Bundle

From the command line:



Running flutter build defaults to a release build

The release bundle for your app is created in the project directory-  [project_name]/build/app/outputs/bundle/release/app.aab. By default, the app bundle contains your Dart code and the Flutter runtime compiled for armeabi-v7a (ARM 32-bit), arm64-v8a (ARM 64-bit), and x86-64 (x86 64-bit).

Build APK

From the command line:



The flutter build command defaults to –release

This command results in three APK files in the project directory:

[project]/build/app/outputs/apk/release/app-armeabi-v7a-release.apk

[project]/build/app/outputs/apk/release/app-arm64-v8a-release.apk

[project]/build/app/outputs/apk/release/app-x86_64-release.apk

Removing the –split-per-abi flag results in a fat APK that contains your code compiled for all the target ABIs. Such APKs are larger in size than their split counterparts, causing the user to download native binaries that are not applicable to their device’s architecture.

Install an APK on a device

Follow these steps to install the APK on a connected Android device. From the command line connect your Android device to your computer with a USB cable.

Article Tags :