Unable to connect with server while running react native app on real android device

后端 未结 1 1317
北荒
北荒 2021-01-22 04:22

I am trying to run my react native app on my real android device as the laptop gets too hot while using Android studio (8 Gb RAM, the pain). Hence, I enabled my USB debugging, p

1条回答
  •  有刺的猬
    2021-01-22 05:02

    You should follow these steps to connect with the bundler.

    1. Make sure that the app and bundler using the same network.

    2. If you are using android add this code in your androidMenifest.xml file.

      
      
      
       
            .......
       
      
    3. if you are adding localhost in the developer setting try to add your IP address like this, yourIP:yourPort

      example: 192.168.89.24:8081

    0 讨论(0)
提交回复
热议问题