1. 程式人生 > >[React-Native] Unable to load script from assets 'index.android.bundle'.

[React-Native] Unable to load script from assets 'index.android.bundle'.

unable als android win oid .com -i ets ava

react native for android 拋出下面異常,解決方法:

java.lang.RuntimeException: Unable to load script from assets ‘index.android.bundle‘.

https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows

  1. (in project directory) mkdir android/app/src/main/assets
  2. 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
  3. react-native run-android

[React-Native] Unable to load script from assets 'index.android.bundle'.