1. 程式人生 > >unable to load script from assets 'index.android bundle' ,make sure your bundle is packaged correct

unable to load script from assets 'index.android bundle' ,make sure your bundle is packaged correct

第一步:在 android/app/src/main 目錄下建立一個 assets空資料夾
第二步:執行 下面這段命令

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/