I have integrated existing android app in react native app. When I run using react native cli it opens the app and after clicking a button to open RN view it gives the error Unable to load script Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release
(refer image)
If I manually create the index.android.js using command
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
and run the app, it works fine.
Also I can see bundle on this url
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false
Any idea what I am missing on?
I am running app in simulator and its not on flying mode.
Bundler opens like this but but on clicking RR, it says No apps connected
(refer image)