How to build and release an Android app

This article shows the steps of how to build a mobile application and how to install and run it on your Android mobile. It will also introduce you to the Flutter Framework.

introducing Flutter

The application is in Flutter which allows you to build, test, and deploy mobile, web, desktop, and embedded apps from a single codebase.

Flutter is an open-source framework by Google, and here you can find free tutorials about it.

In this example, the editor is Visual Studio Code, with the Flutter extension installed, in order to support and debug the Flutter project.

This is the structure of a Mobile project in Flutter. As you can notice, both versions of iOS and Android are present in the project.

Building the app for release

You have these two possible release formats when publishing to the Play Store:

  • App bundle
  • APK

In this post, we will release the app in APK format and will install it on the smartphone.

Start a new terminal, in Visual Studio Code, and go to the Flutter project of the app. In this case, we are located in myapp folder.

Run the command:

flutter build apk --build-name 1.2.3 --build-number 99

It will take a few seconds, to build and release the app in the APK format. As result, you should go to the workspace of Visual Studio Code, where are located the files of the application. In this example, the files are located in:

./myapp/build/app/outputs/flutter-apk

Installing app in Mobile

This process includes connecting your Computer with your Mobile, via cable, so you can copy and paste the APK file in your Mobile. In this example, I copied the file:

app-armeabi-v7a-release.apk

Using My Files browser on my Mobile, I allocated the APK file and pressed Install.

Sometimes, the system requires a confirmation that it is a trusted application. In this case, it is, because we developed it.

After installation, you can see the icon on the Home Screen of your Mobile.

I recommend adding and customizing a Launcher Icon, so it fits your application function.

For more information regarding Building and Releasing the Mobile app on Android, read this documentation in Flutter.

Exit mobile version