React Native – Debug device doesnt connect to dev server

Ok, so here is my situation:

  • First, im trying to connect to my dev server using a device, not an emulator
  • My notebook is at (wi-fi) 192.168.0.108, and my device is in the same wi-fi
  • My server is a json-server, that i manually set the host also to 192.168.0.108
  • I set my axios baseURL to the same 192.168.0.108 plus the port 3000 so "http://192.168.0.108:3000/"
  • I have my api running, and im certain that it works because i can access it in my browser
  • Now, my problem is that i keep getting that same red screen saying that "Could not connect to development server"
  • I already tried: adb reverse tcp:8081 tcp:8081, setting host for device("http://192.168.0.108:3000/"), adding networkSecurityConfig in tag, and also, i already created the network_security_config.xml and added to
  • Is there anything else i can do?


Read more here: https://stackoverflow.com/questions/64940216/react-native-debug-device-doesnt-connect-to-dev-server

Content Attribution

This content was originally published by Vinicius Zamai at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: