From 6c99efae52cccb5426f9c300fafaf50ab5447027 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Fri, 17 Jul 2026 15:48:06 +0200 Subject: [PATCH] fix(android): give release builds more memory --- docs/android.md | 2 ++ packages/app/eas.json | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/android.md b/docs/android.md index ec75faa7c..69a31b5b5 100644 --- a/docs/android.md +++ b/docs/android.md @@ -122,6 +122,8 @@ The flag must be present for both prebuild and Gradle because Gradle starts Metr Keep the excluded npm packages installed. Normal builds use them, while the F-Droid profile removes only their Android native modules and config plugins. Paseo always applies `expo-gradle-jvmargs` with `-Xmx4096m` and `-XX:MaxMetaspaceSize=1024m` so local Expo prebuilds have enough Gradle heap whether they use precompiled AARs or source-built Expo modules. +The EAS `production-apk` profile uses the large Android resource class. Release builds compile the native ABIs and run Hermes bundling in the same Gradle invocation; the default worker can exhaust its remaining memory and kill Hermes with exit code 137 even when Gradle's own heap is correctly sized. + ### React version lockstep Keep `react` and `react-dom` pinned to the React version embedded by the current `react-native` release. React Native `0.81.x` embeds `react-native-renderer` `19.1.0`, so `packages/app` must use React `19.1.0`. Bumping React to a newer patch can build successfully but crash at JS startup on Android with `Incompatible React versions`, leaving the app on the native splash screen. diff --git a/packages/app/eas.json b/packages/app/eas.json index 805217b89..1550f441f 100644 --- a/packages/app/eas.json +++ b/packages/app/eas.json @@ -25,6 +25,7 @@ "extends": "production", "distribution": "internal", "android": { + "resourceClass": "large", "buildType": "apk", "gradleCommand": ":app:assembleRelease -x lint -x lintVitalAnalyzeRelease -x lintVitalRelease -x generateReleaseLintModel -x generateReleaseLintVitalModel" }