unable to load script from assets index.android.bundle
解決如下
unable to load script from assets index.android.bundle
This issue helped me resolve the problem in following steps.
(in project directory) mkdir android/app/src/main/assets
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
react-native run-android
現(xiàn)在每次修改代碼真機(jī)上看效果都需要下面這兩步
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
react-native run-android
怎么回事???誰(shuí)告訴下怎么解決,多謝
2018-04-26
現(xiàn)在android項(xiàng)目app/src/main里建一個(gè)assets文件夾,在使用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 命令執(zhí)行后的效果就是這樣,就能運(yùn)行了。我是用真機(jī)調(diào)試的
2018-04-26
這個(gè)你初始化的代碼是不是就一個(gè)index.js