React native doesn't build Android release. Hangs at bundleReleaseJsAndAssets
See original GitHub issueDescription
Upgraded to 0.43.1 and tried running ./gradlew assembleRelease to generate my Android build apk
It just hangs at usually 91…95% for ever.

Reproduction Steps and Sample Code
Do the required signing for the apk and the various tasks in the gradle files explained here : https://facebook.github.io/react-native/docs/signed-apk-android.html
Go to Android folder and run ./gradlew assembleRelease
for reference, i added some helper scripts in my package.json
//top of package.json
//...
"droid:assr": "cd android && ./gradlew assembleRelease && cd ..",
"droid:rel": "react-native run-android --variant=release",
//...
//rest of package.json
Neither react-native run-android --variant=release or ./gradlew assembleRelease works.
Solution
Building from android-studio with gradle works, but it skips bundleReleaseJsAndAssets so it makes the app crash instantly.
Additional Information
- React Native version: 0.43.1
- Platform: Android (Haven’t tried buiding the release build on iOS yet)
- Development Operating System: MacOS
- Dev tools: Mainly coding in vscode, used android-studio(2.3.1) to try to workout around the problem (no success)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:11
Top Results From Across the Web
React native bundlle js stuck - Stack Overflow
When I run react-native run-android --variant=Release or any other variant I defined in build.gradle I got stuck on Building 91% ...
Read more >Troubleshooting build errors and crashes - Expo Documentation
A reference for troubleshooting build errors and crashes when using EAS Build. ... build/app/node_modules/@react-native-async-storage/async-storage/android/ ...
Read more >bundleReleaseJsAndAssets during Android release builds is ...
[Solved]-bundleReleaseJsAndAssets during Android release builds is taking infinite time-React Native. Search. score:0. $ .\gradlew wrapper --gradle-version ...
Read more >Bundling React Native during Android release builds
* and bundleReleaseJsAndAssets). * These basically call `react-native bundle` with the correct arguments during the Android build * cycle. By ...
Read more >Fixing React-Native android release build - wesionaryTEAM
Fixing React-Native android release build Android release build crashes on launch but works fine on a development mode. couldn't find DSO to load: ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Had the same issue, but I managed to fix it.
For me, the problem was that I use Realm in my tests, and I didn’t remove the generated realm files after a test run. Removing all Realm files fixed it (
rm -rf default.realm* && rm -rf realm-*).I’ve just found a workaround to my particular problem; removing the
realm-object-serverdirectory unblocks thebundleReleaseJsAndAssetsstep