每一个模拟器实例都在一个独立的虚拟路由服务上,独立于你的开发机上的网络和设置。 模拟器不能看到你的电脑也不能看到其他的模拟器实例,相反,他们只可以通过以太网相互连接。
每一个模拟器都有一个独立的虚拟路由,控制网址空间,10.0.2.<xx>,如下的网址空间都市预先设定好的,每个模拟器的网络地址是10.0.2.15
Network Address | Description |
---|---|
10.0.2.1 | Router/gateway address |
10.0.2.2 | Special alias to your host loopback interface (i.e., 127.0.0.1 on your development machine) |
10.0.2.3 | First DNS server |
10.0.2.4 / 10.0.2.5 / 10.0.2.6 | Optional second, third and fourth DNS server (if any) |
10.0.2.15 | The emulated device's own network/ethernet interface |
127.0.0.1 | The emulated device's own loopback interface |
还有一种方式,把开发机连到互联网,ipconfig出ip地址即可。