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

后端 未结 30 4066
鱼传尺愫
鱼传尺愫 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 07:09

    If you are using Windows run the commands in the following way, or if you get an error "Cannot find entry file index.android.js"

    1. 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

提交回复
热议问题