React Native跑項目提示:unable to load script from assets 'index.android.bundle'
錯誤提示
下圖是跑完項目后打開app提示的報錯

解決方法
1、在項目Android/app/src/main目錄下創(chuàng)建一個空的assets文件夾

2、在項目目錄終端里輸入命令:
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、重新跑”react-native run-android“命令即可正常run項目