new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Expo · EAS · all subjects

build-reference/apk

12 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Run EAS Build with a specific profile

To build with a specific profile configured in eas.json, run the command: eas build -p android --profile [profile-name]. For example, to build with the preview profile: eas build -p android --profile preview.

APK is a universal binary containing all resources

When you build an APK with Gradle in a React Native project, the default behavior creates a universal binary that contains all resources for all device types. This includes assets for every screen size, every CPU architecture, and every language, even though a single device will only need one of each. This universal APK file can be shared with anyone to install directly to their device.

Production build requires Android App Bundle (.aab)

Google Play requires new apps to be published as .aab (Android App Bundle) files instead of .apk files. Google Play generates optimized APKs for each device from the bundle. The default production profile produces a .aab. A build profile only produces .apk when android.buildType is set to apk.

Default Android build format is AAB not APK

The default file format used when building Android apps with EAS Build is an Android App Bundle (AAB/**.aab**). This format is optimized for distribution to the Google Play Store. AABs cannot be installed directly on your device.

APK configuration options in eas.json

To generate an .apk, modify eas.json by adding one of the following properties in a build profile: developmentClient set to true (default), distribution set to internal, android.buildType set to apk, or android.gradleCommand set to :app:assembleRelease, :app:assembleDebug, :app:assembleDebugOptimized (available for SDK 54 and later), or any other Gradle command that produces an .apk.

APK build profile example in eas.json

Example eas.json showing multiple APK configuration options: ```json { "build": { "preview": { "android": { "buildType": "apk" } }, "preview2": { "android": { "gradleCommand": ":app:assembleRelease" } }, "preview3": { "developmentClient": true }, "preview4": { "distribution": "internal" }, "production": {} } } ```

Command to build APK with specific profile

Run `eas build -p android --profile preview` to build an APK using a specific profile. The profile name can be customized (such as local, emulator, or any name that makes sense for your use case).

Install APK on Android Emulator automatically

Once your APK build is completed, the CLI will prompt you to automatically download and install it on the Android Emulator. Press Y when prompted to directly install it on the emulator.

Use eas build:run to download and install specific builds

Run `eas build:run -p android` to download a specific build and automatically install it on the Android Emulator. The command shows a list of available builds for the project. Each build in the list displays a build ID, time elapsed since build creation, build number, version number, and git commit information. Invalid builds are also shown if present.

Install latest APK build on emulator

Run `eas build:run -p android --latest` to download and install the latest build on the Android Emulator.

Download APK directly to physical device

To install an APK on a physical device: copy the URL to the APK from the build details page or from the link provided when eas build completes. Send that URL to your device (for example by email). Open the URL on your device, then install and run the APK.

Install APK on physical device using adb

To install an APK using adb: install adb if not already installed, connect your device to your computer, enable adb debugging on your device, download the APK from the build details page or the link provided when eas build completes, run `adb install path/to/the/file.apk`, then run the app on your device.

Give your agent this brain