報(bào)錯(cuò)提示:
Unable to load script.Make sure you're either running a metro server( run 'react-native start' ) or that your bundle 'index.android.bundle' is packaged correctly for release.
解決方法:
1.在項(xiàng)目 android/app/src/main/ 中創(chuàng)建文件夾:assets
2.在項(xiàng)目中執(zhí)行命令:
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