react-native run-android出现
unable to load script from assets 'index.android.bundle'.Make sure your bundle ispackged correctly or you are running a packger server
.
如下图:
1.在androidappsrcmain
下新建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/
执行成功会在androidappsrcmainassets下生成如下两个文件