React Native 'hello world' quick start: “could not connect to development server”

前端 未结 6 1934
面向向阳花
面向向阳花 2021-02-18 14:21

I\'m trying to do the react native \'hello world\', and I\'m using usb debugging on my android.

I ran react-native run-android, then react-native sta

6条回答
  •  南旧
    南旧 (楼主)
    2021-02-18 15:11

    I found the solution :)

    I am on ubuntu 16, so, I used command ip addr show which gave me my computer ip address.

    I used this ip address and I was able to access localhost on my mobile.

    Finally I added the ip address and port no to devsettings of android phone and My app was able to access development server

提交回复
热议问题