> For the complete documentation index, see [llms.txt](https://docs.appetize.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appetize.io/platform/app-management/uploading-apps/android.md).

# Android

To get started, Appetize requires the APK (or APKs) containing your application.

## Finding your APK file

### With Android Studio

Select **Build** -> **Build APK(s)** -> **Build APK(s)** or **Build** -> **Generated Signed APK** (and following the prompts)

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fgit-blob-398ee77dbe6984ac05562aa58a5f6f2e014db171%2Fimage%20(3)%20(1)%20(1).png?alt=media" alt="" width="563"><figcaption><p>Building with Android Studio</p></figcaption></figure>

Once the build is complete you can locate the `.apk` file by selecting `locate` in the dialog that appears

<figure><img src="https://2147444700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJUveBCJfn0GR8-hlqi%2Fuploads%2Fgit-blob-1564527b364f2130ab44c8c89a9ffea05eec47cb%2FScreenshot%202023-05-02%20at%2015.07.06.png?alt=media&amp;token=7c004baf-d4ab-407f-90e0-67bf6dfac00e" alt="" width="368"><figcaption><p>Select <code>locate</code> in the dialog to navigate to the apk</p></figcaption></figure>

or by navigating to

```
{project name}/{app module name}/build/outputs/apk/
```

### With Gradle

Generate your build with `gradle` by running the `assemble` command for your preferred app build variant e.g. `debug` variant

```
./gradlew assembleDebug
```

Once the build is complete you can locate the `.apk` file by navigating to

```
{project name}/{app module name}/build/outputs/apk/
```

## Converting AAB to APK or APKs

Appetize currently supports the `.apk` format and also accepts `.apks` (APK Set archive) files for upload. In order to get your application to work with Appetize you will need to convert your `aab` to an `apk` or `apks` by making use of the [`bundletool`](https://developer.android.com/tools/bundletool) provided by Google.

#### Generate Universal APK Set archive

```shell-session
bundletool build-apks --bundle=/<your app>/{aab name}.aab \
    --output=/{your app}/{app name}.apks \
    --mode=universal
```

#### Generate Single APK file from the Universal APKs (optional)

```
unzip -p /{your app}/{app name}.apks universal.apk > /{your app}/{app name}.apk
```

## Troubleshooting

If you are having trouble running your uploaded Android app in Appetize, we recommend trying to run the same APK on the standard Google-provided Android emulator locally over ADB.

Once your emulator is launched and available via `adb devices`, you can install it using the `install` command:

```
adb install -r {your app}.apk
```

or by simply dragging over the `apk` into the emulator window.

Also check our [Knowledge Base](https://support.appetize.io/) for frequently asked questions and solutions.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appetize.io/platform/app-management/uploading-apps/android.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
