Gradle
Expo · Reference cheat sheet
Gradle
Expo · Reference cheat sheet
📋 Overview
Android builds use Gradle inside android/ (after prebuild) or on EAS builders. Expo abstracts most of this; touch Gradle for custom native modules, packaging options, or troubleshooting.
🔧 Core concepts
- Root —
android/build.gradle,android/settings.gradle,gradle.properties. - App module —
android/app/build.gradle(applicationId, signing,minSdk). - Expo autolinking — native modules linked via Expo / RN Gradle plugins.
- Properties —
org.gradle.jvmargs,hermesEnabled, architectures. - EAS — cloud images run Gradle; override via
eas.jsonenv /expo-build-propertiesplugin.
💡 Examples
// app.config.ts — prefer plugin over hand-editing Gradle
plugins: [
[
"expo-build-properties",
{
android: {
minSdkVersion: 24,
compileSdkVersion: 35,
targetSdkVersion: 35,
kotlinVersion: "1.9.24",
},
},
],
],# android/gradle.properties (generated — customize via plugins when possible)
hermesEnabled=true
newArchEnabled=truecd android && ./gradlew assembleRelease
# or via Expo
npx expo run:android --variant release⚠️ Pitfalls
- Manual Gradle edits wiped by
expo prebuild --cleanunless reflected in config plugins. - Mismatched JDK / AGP versions vs Expo SDK expectations.
- Enabling New Architecture without compatible libraries.
🔗 Related
- build.md — EAS Android builds
- keystore_sign.md — signing configs
- plugins.md — build-properties plugin
- commands.md —
expo run:android