React native run-android do not updating modified code

后端 未结 21 3228
故里飘歌
故里飘歌 2020-12-13 06:02

I am using React native 0.52.0 and react-native-cli 2.0.1 on my Windows PC for android development. Despite all the changes i have made. When I run react-native run-an

21条回答
  •  情书的邮戳
    2020-12-13 06:33

    If you are using index.android.js then follow the following steps:

    Delete index.android.bundle within android/app/src/main/assets and then -

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

    2. cd ./android

    3. ./gradlew assembleRelease -x bundleReleaseJsAndAssets

提交回复
热议问题