Building an Android APK with React Native Expo | Tutorial EAS Build
Beto, February 5, 2023 · 113,306 views
Learn how to build an Android APK for a React Native app using Expo's EAS Build service. You'll learn how to set up the EAS CLI, configuring your project, and running the build to generate an APK file that you can install on devices or emulators.
It's ideal for React Native developers using Expo who want to test features like Google Sign-In that require a standalone build instead of the Expo Go app. I also demonstrate installing and testing the APK on an Android emulator.
What's inside
- Introduction to building APKs with Expo EAS Build
- Limitations of Expo Go for authentication flows
- Installing and logging into EAS CLI
- Initializing EAS configuration in your project
- Configuring eas.json for APK builds
- Running the EAS build command for Android
- Downloading and installing the APK on a device or emulator
- Testing Google Sign-In and app functionality on the built APK
Introduction to building APKs with Expo EAS Build
Expo's EAS Build service lets you build production-ready Android APKs and iOS apps in the cloud. This video focuses on generating an APK for Android, which is a package format optimized for distribution and installation on devices.
The presenter uses a chat app built in my React Native course as the example. I explain that some features, like Google Sign-In, cannot be fully tested inside the Expo Go app, so building a standalone APK is necessary.
Limitations of Expo Go for authentication flows
When developing with Expo Go, redirecting users back to the app after signing in with Google or Apple is not supported. This causes errors and loading issues during authentication flows.
To fix this, you need to build a standalone app with EAS Build. The standalone APK includes the proper configuration and deep linking support so users can be redirected back to the app after signing in.
Installing and logging into EAS CLI
You must install the EAS CLI globally on your computer to interact with Expo's build servers. The command is:
After installation, log in to your Expo account with:
You can verify your login status with:
Having an Expo account is required to use EAS Build services.
Initializing EAS configuration in your project
Run the command:
This creates an file in your project root. It contains build profiles and settings for Android and iOS.
You can select which platforms to configure (Android, iOS, or both). The file lets you customize build types, environment variables, and other options.
Configuring eas.json for APK builds
Inside , you define build profiles such as or . To build an APK for Android, set the build type to under the Android platform in the desired profile.
Example snippet:
"preview": {
"android": {
"buildType": "apk"
}
}This configuration tells EAS Build to generate an APK instead of the default Android App Bundle (AAB), which cannot be installed directly on devices for testing.
Running the EAS build command for Android
To start the build, run:
The flag specifies the platform, and uses the profile defined in .
The CLI uploads your project to Expo's servers and queues the build. For free accounts, build times may be longer due to shared resources.
Downloading and installing the APK on a device or emulator
Once the build completes, you receive a download link for the APK file. You can:
- Download the APK to your computer
- Drag and drop it into an Android emulator to install
- Transfer it to a physical Android device for installation
This lets you test the app as if it were installed from the Play Store.
Testing Google Sign-In and app functionality on the built APK
With the standalone APK installed, Google Sign-In works correctly because the app can handle redirects back from the authentication flow.
I show signing in successfully and interacting with the chat app, including posting messages and syncing between Android and iOS devices.
This confirms that building with EAS is essential for testing features that require a real app environment beyond Expo Go.
Resources

CourseReact Native course
Learn React Native fundamentals and build real apps like the chat application used in this video.

Premium resourcePro Membership
Get access to exclusive tutorials and support for React Native and Expo.
Like this article? Get the rest of the library plus weekly React Native tips. Free.