React-native Assemblerelease Fails For Task ':app:bundlereleasejsandassets'
Solution 1:
First:
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
finally build:
./gradlew assembleRelease -x bundleReleaseJsAndAssets
Solution 2:
Looks like you haven't made a js bundle so please make a bundle first by using command :-
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
then in your project directory
cd android
Clean your gradle
./gradlew clean
and make a build finally
./gradlew assembleDebug
Try this. Hope it will helps you.
Solution 3:
For me the creating the bundle failed, but I noticed this comment by Sahin Elidemir:
just ./gradlew assembleRelease -x bundleReleaseJsAndAssets saved me.
It almost worked for me. What worked at the end was (notice the app:
, which for me it fails without, and a clean
for good measure):
./gradlew clean app:assembleRelease -x bundleReleaseJsAndAssets
Solution 4:
Just using ./gradlew --stop
and then ./gradlew assembleRelease
worked for me.
Solution 5:
I had the same problem, the solution was :
cd
to yourApp/android folder
run this
./gradlew --stop
and then
./gradlew assembleRelease
This gonna build your app.
After build is done, go to see your application(apk).
android\app\build\outputs\apk\release
Post a Comment for "React-native Assemblerelease Fails For Task ':app:bundlereleasejsandassets'"