Expo Android Development Build with EAS: Zero to Hot Reload
When your Expo app needs a native module that Expo Go doesn’t ship, such as push notifications, maps, payments or the SMS Retriever API, you need a development build. This is your own APK, with your native code and the expo-dev-client menu. It loads JavaScript from Metro on your machine, so you keep hot reload.
You build the APK once. After that, you only rebuild when native code changes.
Expo Go vs development build
Section titled “Expo Go vs development build”| Expo Go | Development build | |
|---|---|---|
| Who builds it | Expo, from the store | You, with EAS or locally |
| Native modules | Only the ones Expo Go includes | Any module in your package.json |
app.json plugins, icon, package name |
Ignored | Applied |
| JS hot reload | Yes | Yes |
Cloud or local
Section titled “Cloud or local”You can build the APK in two ways:
- EAS Build (cloud). It needs no Android SDK on your machine. The free plan has a queue, so a build can take 10 to 30 minutes.
npx expo run:android(local). It needs Android Studio, the Android SDK,ANDROID_HOMEand a matching JDK. The first build is slow and later builds are fast.
The steps below use EAS, because it works on any machine with Node.
Build and run a development build
Section titled “Build and run a development build”-
Install the EAS CLI and log in. Create a free account on expo.dev first.
Terminal window npm i -g eas-clieas login -
Add the dev client to the app.
Terminal window npx expo install expo-dev-client -
Set the application ID in
app.json. Choose it carefully: after you publish to Google Play, you can’t change it.{"expo": {"android": { "package": "com.example.app" },"ios": { "bundleIdentifier": "com.example.app" }}} -
Link the project to EAS and create
eas.json.Terminal window eas init # writes extra.eas.projectId to app.jsoneas build:configure # creates eas.json -
Set three build profiles in
eas.json.{"cli": { "appVersionSource": "remote" },"build": {"development": {"developmentClient": true,"distribution": "internal","android": { "buildType": "apk" }},"preview": {"distribution": "internal","android": { "buildType": "apk" }},"production": { "autoIncrement": true }}} -
Start the build.
Terminal window eas build --profile development --platform androidAt the end, EAS prints a link and a QR code to the APK.
-
Install the APK. Open the link on the phone and allow your browser to install unknown apps. With a USB cable, you can also download the file and run
adb install app.apk. -
Start Metro.
Terminal window npx expo startWith
expo-dev-clientinstalled,expo starttargets the development build, not Expo Go. Open the app on the phone. It lists the server when the phone and the computer are on the same Wi-Fi. You can also scan the QR code.
When to rebuild
Section titled “When to rebuild”JavaScript and asset changes reload on the phone. Shake the phone to open the dev menu. Run eas build again only when you:
- add or remove a package that contains native code
- change
pluginsinapp.json - change the icon, the splash screen or the package name
- upgrade the Expo SDK
The three profiles
Section titled “The three profiles”| Profile | Output | Needs Metro | Use |
|---|---|---|---|
development |
APK with dev client | Yes | Daily work |
preview |
Standalone APK | No | QA and stakeholders, shared by link |
production |
AAB | No | Google Play, through eas submit |
Build a preview APK for testers. It runs without your laptop:
eas build --profile preview --platform androidFor the store:
eas build --profile production --platform androideas submit --platform androidappVersionSource: "remote" with autoIncrement lets EAS manage versionCode, so you never bump it by hand.
What production teams add
Section titled “What production teams add”- App variants. Convert
app.jsontoapp.config.tsand read anAPP_VARIANTenv var. Give each variant its own name and package, for examplecom.example.app.dev. The dev and production apps can then sit side by side on one phone. - Environment variables per profile. Store API URLs in EAS environment variables (
eas env:create) and read them asEXPO_PUBLIC_*. Don’t hardcode them. - OTA updates.
expo-updateswith EAS Update sends JS fixes to preview and production builds without a new binary. - Fingerprint runtime version. The
fingerprintruntime version policy hashes your native layer. If the hash doesn’t change, publish an update and skip the rebuild. - CI. EAS Workflows in
.eas/workflows/build a preview on each pull request and a production build on each release tag.
Monorepo notes
Section titled “Monorepo notes”In a pnpm or Yarn workspace, run every eas command from the app folder (for example apps/client), not from the repository root. EAS finds the package manager from the root lockfile.
Want help with this in your own project? See my services: React Native mobile apps.