react-native报错Could not get BatchedBridge, make sure your bundle is packaged correctly

Could not get BatchedBridge, make sure your bundle is packaged correctly

执行

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

报错

ENOENT: no such file or directory, open 'F:\code\rn-wallpaper\Wallpaper\android\app\src\main\assets\index.android.bundle'

在main目录下新建assets目录再次执行

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

生成index.android.bundle打包文件,问题解决


版权声明:本文为wojiong132原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。