I use the VS-Code terminal to open metro using 'npx react-native start' and then connect my device through USB and install the app and run it using 'npx react-native run-android'. I then remove the USB cable because it is disconnecting and connecting constantly so I work through wi-fi, but sometimes the device disconnects from the dev-server and I cannot reconnect without using a USB cable again and repeating the steps above. I have set my ip and port in the dev menu in-app. Any tips would be greatly appreciated!
I have tried using adb reverse or adb connect commands, but to no avail.
When you connect your device by USB follow next commands
adb tcpip 5555
adb connect 192.168.1.35:5555
- your device local IPadb devices
check only one device connected by USB exists