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
For all of you guys who are developing from a create-react-native-app and ejected, and have this issue in development
,
this is what worked for me
just a little detail from the accepted answer
(in project directory) mkdir android/app/src/main/assets
here comes the part that changes cos you are in development get rid of the --dev: false
part:
react-native bundle --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
after that close all terminals, erase the build folder from android/app/ to make sure you start clean to build your app, open a new terminal, and
(in project directory) npm run android
will prompt the packager console (in another terminal) and build successfully