Original article:Http://blog.csdn.net/hongchangfirst/article/details/7934759
Author:Hongchangfirst
The PC can access the Internet, while the android simulator on the PC cannot access the Internet. As longThe simulator is the same as your PC.In the CIDR Block:
First, if the SDK environment variable is not configured, run the CMD command to go to the platform-tools directory (D: \ Program
Files \ Android-SDK-Windows \ platform-tools), and then use the ADB shell command
If the environment variable of the SDK is configured
In the CMD window, enter the ADB shell, for example, C: \ Documents and Settings \ Administrator> ADB shell.
Enter getprop to view the current attributes of the system and obtain the DNS address of the simulator, as shown below:
[Net. dns1]: [10.0.2.3]
Use the setprop command to change the DNS of the simulator to the DNS of your PC, for example, 192.168.0.185.
setprop net. dns1 192.168.0.185
press enter, OK.