报错信息:
java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a packager server.
解决办法:
①先在在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/
结果
执行react-native run-android 启动项目
现在android/app/src/main/assets就有相应的文件了