Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 30343

React-Native/Android err: Could not connect to the development server

$
0
0

I'm new to RN and I've been trying to run this react-native app for days now. After following up the guides provided by the official website, I came to the point where the app creates and builds without any errors.

However, when I try to reload to view my app's code changes, it gives me this error: Could not connect to the development server.

I did lots of research related to this error and I checked all the solutions suggestions that are provided in the error.

I use Windows OS. The emulator is android one provided by Genymotion

React-native version:

react-native-cli: 2.0.1react-native: 0.61.5

Some of the things I've tried:

  • Checked if the server is on (it is)
  • Giving my machine's IP adress and & port number to the debug server host & port for device in the Genymotion emulator
  • I ran this command to bundle index.android.bundle: 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
  • adb reverse tcp:8081 tcp:8081
  • Tried to use emulators provided by Android studio - same result
  • android:usesCleartextTraffic="true" to AndroidManifest.xml

I should probably mention that I installed this package due to a building error : @react-native-community/cli

Images attached here:

Full error

Metro Bundler. -> This is everything that it shows, I think that it should show more stats about bundling a JS file, in my case App.js


Viewing all articles
Browse latest Browse all 30343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>