android如何访问本地网络?
伊谢尔伦
伊谢尔伦 2017-04-17 17:31:16
0
3
647

本地有个php环境,在本地浏览器可以访问本机的这个地址:http://127.0.0.1/test/listviewtest/news.php
可是android模拟器不能访问,报这个错误:

java.net.ConnectException: failed to connect to /127.0.0.1 (port 80) after 2500ms: isConnected failed: ECONNREFUSED (Connection refused)

网上说的把127.0.0.1改成10.0.2.2,没有成功。

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
左手右手慢动作

You first use the browser in the simulator to access the following http://127.0.0.1/test/listviewtest/news.php

迷茫

Change 127.0.0.1 to the IP of your computer in the LAN
How to get it: Open cmd, enter ipconfig to get your IP

迷茫

1. Use your real IP instead
2. Use your real machine (connected to wifi) and access the address with your browser

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template