1

On my system another application is using 8081 port. I am running below command to start react-native app on 9988

react-native start --port 9988

However when I run android, app is still listening at 8081 port

react-naive run-android

I managed to get it running by using adb reverse command for my Physical device

adb -s <deviceid> tcp:8081 tcp:9988

I have to do this every time when I am running android on my Physical Device. For emulator it is still not working even after using adb reverse.

Is there config which I can change to default 9988 port

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mahesh B
  • 143
  • 2
  • 13

2 Answers2

2

Yes, shake your device and edit the development settings. If I remember correctly you must specify the IP followed by the port.

127.0.0.1:9988
FMCorz
  • 2,586
  • 1
  • 21
  • 18
0
  1. Access the in-app developer menu – TLDR: adb shell input keyevent 82
  2. Dev settings > Debug server host & port for device (Under "Debugging" section)
  3. Enter localhost:9988
  4. react-native run-android --port 9988
eightyfive
  • 4,601
  • 3
  • 35
  • 44