Android cannot access localhost?

霸气de小男生 提交于 2019-12-05 03:30:42

You shoud use next IP 10.0.2.2

Just check this http://developer.android.com/guide/developing/devices/emulator.html#networkaddresses

If ur app running in localhost:3000, then try to use as 10.0.2.2:3000 in your android emulator

user3583986

Try to use your ip address in your pc (ipconfig to see the ip address for your pc)

IPv4 Address. . . . . . . . . . . : 192.168.1.12

So, use: 192.168.1.12:3000

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!