解决办法:
只要文件名是这两个就可以了
index.Android.bundle 以.bundle 作为后缀名
index.android.map 以.map 作为后缀名
在项目的package.json中加入以下代码:
"bundle-android": "react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --sourcemap-output android/app/src/main/assets/index.android.map --assets-dest android/app/src/main/res/"
终端下 cd 你创建的项目的根目录下执行下面代码
react-native start > /dev/null 2>&1 & curl “http://localhost:8081/index.android.bundle?platform=android” -o “android/app/src/main/assets/index.android.bundle”