Android cannot access localhost?
I started a local http server on Android and it can be reached by other computers in the same local network. But if I try to access this server using opera on the same phone, it won't work. So this means we are not able to access localhost on Android? Thanks!
你应该使用下一个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
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
上一篇: 如何检查复选框数组中的复选框是否使用jquery进行检查
下一篇: Android无法访问本地主机?