Release APK Not Updating With JavaScript Code

后端 未结 4 901
醉话见心
醉话见心 2020-12-04 17:14

My Android APK is running off the JavaScript present when I generated the first signed APK. I\'ve tried cleaning/rebuilding the project in Android Studio, I\'ve

相关标签:
4条回答
  • 2020-12-04 17:28

    if you were using EXPO and you have ejected the app, the build process still pass through EXPO's server. In order: from the project root folder publish the changes to EXPO:

    expo-cli publish
    

    then, once it is finished, from within the android root folder:

    gradle assembleDebug
    

    or

    gradle assembleRelease
    
    0 讨论(0)
  • 2020-12-04 17:34

    I deleted the index.android.* files in android/app/src/main/assets/ directory. Then in the project root, ran

    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
    

    Then I regenerated the signed APK and voila!

    EDIT: If you are using a newer project, you may not have an index.android.js only index.js. If that's the case, you'll want to change it to:

    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
    
    0 讨论(0)
  • 2020-12-04 17:42

    The below commands worked for me ...

    1. cd android
    
    2. gradlew clean
    
    3. gradlew assembleRelease
    

    thanks

    0 讨论(0)
  • 2020-12-04 17:48

    1.Delete (index.android.bundle) files inside directory android/app/src/main/assets.

    2.run 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.Delete folders (drawable,drawable-hdpi,drawable-mdpi,drawable-xhdpi,drawable-xxhdpi,drawable-xxxhdpi,raw) inside android/app/src/main/res

    4.run react-native run-android --variant=release

    IF NOT WORKING TRY THIS https://github.com/react-native-community/async-storage/issues/127#issuecomment-502574735

    0 讨论(0)
提交回复
热议问题