React-native打包遇到問題:Could not get BatchedBridge

打包後使用時仍然找不到js bridge

需要在根目錄使用命令:

react-native bundle --platform android --dev 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文件夾,自己新建,另外注意自己的目錄結構和上面的命令中的是否一致

以上

發佈了64 篇原創文章 · 獲贊 32 · 訪問量 20萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章