0

Once the application is developed, I want to package it for release. Install it on my phone and it's not the latest page

react-native:0.58.6 react:16.8.3

cd android && gradlew assembleRelease

krysliang
  • 67
  • 7
  • you can delete build folder and rebuild it.. Also Please explain more about your problem https://stackoverflow.com/help/how-to-ask – Ajay Pandya Aug 21 '19 at 04:22
  • Possible duplicate of [Unable to load script from assets 'index.android.bundle'.](https://stackoverflow.com/questions/48563283/unable-to-load-script-from-assets-index-android-bundle) – Rishav Kumar Aug 21 '19 at 06:30

2 Answers2

0

try to run (for RN android)

1. react-native start --reset-cache
 2. 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
 3. cd android
 4. gradlew clean
 5. gradlew assembleDebug
Saloni Parikh
  • 144
  • 1
  • 10
0

Here are the steps you need you to follow to solve this issue.

Delete android folder and do react-native upgrade (not react-native run-android)

create the folder in the following location.

your_app/android/app/src/main Perform the following command in root directory. (simply copy and paste the below code)

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/
Please note if you are using index.android.js then replace it in --entry-file.

and lastly

cd android && ./gradlew installDebug

Hope this solves your solution.

Go to this reference

Rishav Kumar
  • 4,979
  • 1
  • 17
  • 32