What is the difference between expo build:android -t apk and expo build:android?

Please provide the following:

  1. SDK Version: 35
  2. Platforms(Android/iOS/web/all): android

I’m trying to publish an app, and the docs say,

# Start the build:
Run expo build:android or expo build:ios

Literally on the next line, without any explanation it says,

# If you choose to build for Android
When building for android you can choose to build APK (expo build:android -t apk)

No where does it explain the difference. Which should I use when I want to build an android app for the Google Play Store?

If you type the following you will get some more details:

$ expo build:android --help

  Usage: build:android|ba [options] [project-dir]

  Build a standalone APK or App Bundle for your project, signed and ready for submission to the Google Play Store.


    -c, --clear-credentials           Clear stored credentials.
    --release-channel <channel-name>  Pull from specified release channel. (default: default)
    --no-publish                      Disable automatic publishing before building.
    --no-wait                         Exit immediately after triggering build.
    --keystore-path <app.jks>         Path to your Keystore.
    --keystore-alias <alias>          Keystore Alias
    --generate-keystore               Generate Keystore if one does not exist
    --public-url <url>                The URL of an externally hosted manifest (for self-hosted apps)
    -t --type <build>                 Type of build: [app-bundle|apk]. (default: apk)
    --config [file]                   Specify a path to app.json
    -h, --help                        output usage information

The -t option allows you to build either an APK or an App Bundle. App bundles are the new way of doing things. App bundles allow the Google Play Store to provide the phone/tablet with a version of the app customized for the device’s processor. This means the package that the device downloads is smaller so takes less data to download and less storage space.

APKs, on the other hand, have to bundle e.g. 32 bit code and 64 bit code for both ARM and x86 in order to be installable on all devices.

According to the help output above, the default is to build an APK, so there is no difference between expo build:android and expo build:android -t apk. So it’s a bit strange for the docs to imply there is a difference :slightly_smiling_face:

Ideally you should build an app bundle, but an APK will also work. The app bundle will be as large as or larger than the APK, but when the device downloads it a customized version will be generated on the fly by the Google Play Store.


You’re the best, thanks!


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.