The Android5.0 simulator cannot access the Internet.

Source: Internet
Author: User

The Android5.0 simulator cannot access the Internet.

The simulator compiled by the recently downloaded android5.0.1 Code cannot access the Internet, and the following error occurs: net: ERR_NAME_NOT_RESOLVED.

After searching online, the solution is simple:

1. Start the simulator

2. For example:


Adb shell getprop net. dns1 // view dns value adb shell setprop net. dns1 192.168.1.1 // set dns, which is generally the ip address of your vro (this ip address can be used to set route attributes. you should understand it)


Now there is such a situation. the dns1 value is set to another value (for example, 192.168.1.10), so that the network is not accessible, and then 192.168.1.1 is set to be returned. Then, the default android 10.0.2.3 value is set to be returned, at last, I restarted the simulator (note that the current dns is 10.0.2.3). After the restart, I was able to go on... This is amazing !!! It seems that if you cannot go up later, you can switch back and forth between the two addresses.

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.