skip to Main Content

In React Native running ./gradlew assembleRelease produce build apk,
but the JS code is not updated.I also did ./gradlew clean but still no luck.

But If I did below two command the code is updated.

  1. npx 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
  1. rm -rf android/app/src/main/res/drawable-* && rm -rf
    android/app/src/main/res/raw/*

Do I always have to do this ?

2

Answers


  1. I think you need clean with ./gradlew clean then ./gradlew assembleRelease

    Login or Signup to reply.
  2. If you’re not using the React Native Gradle Plugin, then you have to run this bundling command before every release build. The bundling command create a React Native bundle, which will be included with your native Android app. You can refer this link

    If you don’t want to run bundling command each time you make new build.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search