配置react-native环境时:
报错信息:报红
unable to load script from assets 'index.android.bundle'.Make sure your bundle ispackged correctly or you are running a packger server.
原因分析:
新版本文件名已经从index.android.js变为了index.js;
至于assets文件夹就是用来存放index.android.bundle等文件用;
解决方案:
新建assets
进入\android\app\src\main 新建assets文件夹
2 修改entry–file
根目录cmd运行命令:
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 运行run-android