Unable to load script from assets index.android.bundle on windows

后端 未结 30 3518
鱼传尺愫
鱼传尺愫 2020-11-22 06:33

I\'m trying to run my first React Native project for first time on my device (Android 4.2.2).

And I get:

unable to load script from assets in

30条回答
  •  不思量自难忘°
    2020-11-22 06:59

    Using npm version 4.3.0 react-native-cli version 2.01 react-native version 0.49.5

    In the 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

    The file name has changed from index.android.js to index.js

提交回复
热议问题