Home › Build error fixes › Android / Gradle

JavaScript bundle step failed (Android release)

Android / Gradle · last reviewed 2026-11-10

The error looks like this

> Task :app:bundleReleaseJsAndAssets FAILED

* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'cmd'' finished with non-zero exit value 1

Why it happens

Metro could not build the release JS bundle: an import that only fails in release mode, a syntax error, or node running out of memory.

How to fix it

  1. Reproduce it directly to see the real error: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output /tmp/out.bundle
  2. Fix the module or syntax error it prints.
  3. If it only fails inside Gradle on Windows, shorten the project path and run: cd android && gradlew --stop

Not sure this is your error? Let ReleaseMedic read the whole log

Build logs are long and the last line is rarely the real cause. ReleaseMedic finds the first real error, explains it and gives the steps — free, and the log never leaves your computer.

$ npx releasemedic log build.log

Or pipe a build straight in: cd android && ./gradlew bundleRelease 2>&1 | npx releasemedic log -

Catch it before you build

Most release errors come from project settings you can check in seconds — signing, SDK levels, privacy manifests, permissions, push and login setup.

$ npx releasemedic

Related Android / Gradle errors