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

前端之家收集整理的这篇文章主要介绍了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打包文件,问题解决

猜你在找的React相关文章