> ## Documentation Index
> Fetch the complete documentation index at: https://docs.newly.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Download an Android APK

> Build a standalone release APK of your app and install it on an Android phone.

Newly can build a **production Android APK**: a standalone release build with your JavaScript bundled in. It installs on any Android phone and runs on its own, with no Metro and no development server.

This is for trying your app on a real Android phone and sharing it with testers. It isn't a Google Play upload. See [From TestFlight to the App Store](/publish/app-store-and-google-play) for what Newly does and doesn't publish for you.

<Note>
  APK builds are in the web app at app.newly.app, in Remote chats.
</Note>

## Before you build

A build always comes from a **saved source**: the code as it stood at a turn where you ran an Android preview. If nothing is saved yet, the card says "Run an Android preview to save a source turn before building its APK." Open the Android simulator once, and the source is saved.

The card names the saved source by its commit, so you can tell which changes are in it. To include newer work, make the changes in the chat and run the Android preview again.

## Build one

<Steps>
  <Step title="Ask for it in the chat">
    Ask the agent for an Android APK. The **Production Android APK** card opens in the chat.
  </Step>

  <Step title="Press Build production APK">
    The card shows **Queued**, then **Building**, with the step it's on ("Installing dependencies", "Compiling release APK", "Publishing APK") and how long it has been going. A build takes around 12 minutes. Once a project has finished builds, the estimate comes from its own times instead.
  </Step>

  <Step title="Get told when it's done, if you want">
    Press **Notify me when the build finishes** for a browser notification. If your browser blocks notifications, the card says so, and you can allow them in your browser's site settings.
  </Step>

  <Step title="Download it">
    When the card turns **Ready**, press **Download APK**, which also shows the file size. The line under it gives the build time and the source it was built from.
  </Step>
</Steps>

## Install it on a phone

Copy the APK to an Android phone and open it. Android asks you to allow installing apps from this source the first time. This is an ordinary release build, so it stays installed and runs without Newly open.

## Every build for the project

The chat card shows only the newest build for that chat. **Deploy** then **Android builds** lists every production APK built for the project, across all of its chats, newest first, with its status and when it ran. Download an older one from there.

Builds start from a chat, not from that list.

## When the source moves on

If you keep working after a build, the card notices: it says newer source is saved and offers **Build with latest source**. The APK you already have keeps working, it just doesn't have the newer changes in it.

## If a build fails

The card turns **Failed** and shows what went wrong, with **Retry build** under it.

* Press **Show build log** to read the end of the build output.
* Ask the chat to fix it. The agent can read the build's log and change the code.
* A build can also fail for a temporary reason on our side. Retrying the same source is worth one attempt before anything else.

## Who can build and download

You need to be signed in, and the project has to be open.

* **Can view** access can download an APK, but not start a build: "An editor must request this build."
* **Can edit** and **Admin** can do both.

Building an APK doesn't draw down credits. The agent's work in the chat does. See [How credits work](/billing/how-credits-work).

## Related

<CardGroup cols={2}>
  <Card title="From TestFlight to the App Store" icon="upload" href="/publish/app-store-and-google-play">
    What Newly publishes for you, and what it doesn't.
  </Card>

  <Card title="Testing on a real phone" icon="device-mobile" href="/preview/test-on-a-phone">
    iPhone through TestFlight, Android through an APK.
  </Card>
</CardGroup>
