A reference repo showing how to fix Expo SDK 52 Android builds without ejecting.
These scripts dynamically inject missing Kotlin files and patch Gradle during EAS remote builds, restoring compatibility with React Native 0.76.
- Expo SDK 52 stopped generating critical Kotlin files:
MainApplication.ktMainActivity.ktReactNativeHostWrapper.ktPackageList.ktApplicationLifecycleDispatcher.kt
- React Native 0.76 still expects them to exist.
- Without them → 100+ failed builds, Gradle crashes, unresolved references.
- Ejecting was not an option.
This repo shows the working approach: inject Kotlin stubs + patch Gradle on the fly.
-
Copy scripts into your project
- Place
scripts/eas-build-post-install.jsunderscripts/ - Place
plugins/withInjectHostWrapper.jsunderplugins/
- Place
-
Add postinstall hook to your package.json
{ "scripts": { "postinstall": "node ./scripts/eas-build-post-install.js" } }