I am trying to start my hello world app using react native using windows 7 and an android device. There is a similar issue here but I have failed make it work.
Commands I have run so far to set up and lead to this issue.
- Created the app:
react-native init helloMe
- Moved to the root Dir[helloMe].
react-native run-android
- Android Device is set up okay and showing in CMD using adb
- Opened another CMD window then ran:
react-native start
- Ran
react-native run-android
again. - Red Screen is shown on phone with this error unable to load script from assets index.android.bundle on windows
Trying to fix it with the solution in step 6 leads to another error which is why I am here. below is my CMD log.
E:\testdir\react_ws\helloMe>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 Scanning 558 folders for symlinks in E:\testdir\react_ws\helloMe\node_modules (30ms) Scanning 558 folders for symlinks in E:\testdir\react_ws\helloMe\node_modules (20ms) Loading dependency graph, done. Cannot find entry file index.android.js in any of the roots: ["E:\\testdir\\react_ws\\helloMe"] E:\testdir\react_ws\helloMe>
Now I am getting another error when I try to fix the problem with the above solution.
Cannot find entry file index.android.js in any of the roots: ["E:\\testdir
\\react_ws\\helloMe"]
If have tried to apply this fix from here
npm run start -- --root <directory_with_your_react_component_js_sources>
I since I am running the command in the project root, I ran this instead
npm run start -- --root ./
but it did not work.
This is my root project structure
__tests__ app.json index.ios.js node_modules yarn.lock
android index.android.js ios package.json
I hope I am clear, any help would be highly appreciated. Device is stuck on red screen with a 404.
React-native-version
react-native-cli: 2.0.1
react-native: 0.46.0