> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/platform/guides/developer-guide/flutter-mobile-app-ui-developer-guide/build-deploy-and-publish/generate-android-apks-and-app-bundles.md).

# Generate Android APKs & App Bundles

## Overview

Follow the steps on this page to build the APK and IPA for deploying in Play Store and App-store.

## Steps

### Generate APK For Testing

1. Follow the [Flutter Installation and setup Guide](/platform/guides/developer-guide/flutter-mobile-app-ui-developer-guide/setup-development-environment/flutter-installation-and-setup-guide.md) and [Run the Application](/platform/guides/developer-guide/flutter-mobile-app-ui-developer-guide/setup-development-environment/run-application.md) till the Flutter pub is set up.
2. Run the below command in your terminal from theroot of the project to generate the APK

   **`flutter build apk --release`**

<figure><img src="https://lh5.googleusercontent.com/i5RVBw4Xi1kLQZJ3Lv6kmAx-wjDKcVgIeq_1Xg-Dc5ksIzR1CHSNyI7ed7zYwva79eU6nenF837ZsNhNU29XAq4vbhS1BaETLUFmzDRc4zBVpSQTsZhfx-56rp3QqMBJnzJrK80sST5Do6DYOyduVls" alt=""><figcaption></figcaption></figure>

### Generate & Publish App Bundle To Play Store

#### Pre-requisites

* Prior knowledge of generating unique key store files for your application ( Reference links: [Generating key store for your Android application](https://docs.oracle.com/cd/E35822_01/server.740/es_admin/src/tadm_ssl_jetty_keystore.html))
* Changing the App name
* Changing App Logo (Ref Link: [Changing app logo in Flutter](https://www.geeksforgeeks.org/flutter-changing-app-icon/))
* Prior knowledge of app bundle creation for publishing in the Play Store
* Terms and Conditions and Privacy Documents for your application

{% hint style="info" %}
**Note:** The generated key store file needs to be added to the Android/app folder of your project. This is needed for publishing the next version of your application.

<img src="/files/rCLVR8tBnOm7d9Et1oLs" alt="" data-size="original">
{% endhint %}

#### Steps

1. Add a key.properties file inside your Android folder which is a reference to your key store file. Below is the sample key.properties file.

```
storePassword=muktasoft
keyPassword=muktasoft
keyAlias=upload
storeFile=muktasoft.jks
```

2. Run the below command in your terminal from the root of the project to generate the App bundle to publish in the play store.

**`flutter build app bundle`**

<figure><img src="/files/NMsQP1g8ZT6nnfULapIZ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/platform/guides/developer-guide/flutter-mobile-app-ui-developer-guide/build-deploy-and-publish/generate-android-apks-and-app-bundles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
