How to configure network connectivity for Android Simulators

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.