kaustav
kaustav

Reputation: 21

Build failed for task ':app:bundleReleaseJsAndAssets' in react native

At the time of release build getting error in react native

Upvotes: 0

Views: 596

Answers (1)

Akila Devinda
Akila Devinda

Reputation: 5492

In your scenario I think you haven't made a js bundle so please make a bundle first by using command from your project root folder

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

After that move in to your project's android directory using cd android

Before make release build make sure to clean your gradle using ./gradlew clean

And finally run this command ./gradlew assembleRelease -x bundleReleaseJsAndAssets

I have posted a full answer on this issue on here

Upvotes: 1

Related Questions