React-native打包遇到问题:Could not get BatchedBridge

前端之家收集整理的这篇文章主要介绍了React-native打包遇到问题:Could not get BatchedBridge前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

打包后使用时仍然找不到js bridge

需要在根目录使用命令:

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

并且如果没有assets文件夹,自己新建,另外注意自己的目录结构和上面的命令中的是否一致

以上

原文链接:https://www.f2er.com/react/304981.html

猜你在找的React相关文章