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

前端 未结 5 1440
别那么骄傲
别那么骄傲 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:07

    To resolve Unable to load script from assets index.android.bundle - React Native follow below process :

    You have to create dir assets manually in your android project or make Directory by Terminal/CMD enter mkdir android/app/src/main/assets

    Go at the created Directory if that is successfully created then

    run step 3 Command:

    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
    

    you have your missed files in the folder now you can Run your React Native project npm run android.

    https://stackoverflow.com/a/53275340/9489285

提交回复
热议问题