Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a packager server

前端 未结 5 1512
别那么骄傲
别那么骄傲 2021-02-06 02:41

I am having working React Native application having version 0.38.0, when i have tried to upgrade it to 0.45.1 it is showing following error

java.lang.RuntimeExce         


        
5条回答
  •  耶瑟儿~
    2021-02-06 03:06

    1- Create a new folder => android/app/src/main/assets
    2- Run this command =>

     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  
    

    This command will create 2 files : index.android.bundle & index.android.bundle.meta

    3- run command => react-native run-android

提交回复
热议问题