第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

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í)告訴下怎么解決,多謝


正在回答

2 回答

現(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)試的

https://img1.sycdn.imooc.com//5ae187fb000123f804960670.jpg?

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

楊曉龍0

在MainApplication 有這么和方法, @Override protected String getJSMainModuleName() { return "index"; } 調(diào)用js的模塊才能調(diào)用assets最新的index.android.bundle文件才能看到修改的內(nèi)容
2018-04-27 回復(fù) 有任何疑惑可以回復(fù)我~

這個(gè)你初始化的代碼是不是就一個(gè)index.js

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
ReactNative入門(mén)與進(jìn)階
  • 參與學(xué)習(xí)       70471    人
  • 解答問(wèn)題       168    個(gè)

React Native跨平臺(tái)技術(shù)入門(mén)與進(jìn)階

進(jìn)入課程

unable to load script from assets index.android.bundle

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)