0

in android enmulator error: enter image description here

add i run the code: react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ get this error: enter image description here

Cannot find entry file index.android.js in any of the roots: ["E:\git_app"]?

why has this error? and how to rsolve? thanks!

env: window 10 android studio 3.0.1 Cmder

project: enter image description here

mmy
  • 67
  • 1
  • 13

1 Answers1

0

I see there are files with named App and index in your root project. I assume that you use the new version of react native.

You can't use that command since rn changed the index.android.js to index.js.

Try using this instead:

  • 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

Check the original answer on this link:

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

DennisFrea
  • 1,112
  • 8
  • 10