Android emulator not able to access the internet

2019-01-16 06:01发布

I know that similar questions have been asked before, but my problem is new only after installing Android Studio 2.3, the latest version in March 2017. I have several years experience developing Android applications, and I have never encountered this problem before. After upgrading to version 2.3 of Android Studio, my emulator is no longer able to access the internet. I even uninstalled/reinstalled Android Studio 2.3 from scratch and created a new emulator, and I am still getting the same error. This is not an app problem. I can't even access the internet from Chrome, and I wasn't having this problem last week. The message that I get says that the server DNS address could not be found -- DNS_PROBE_FINISHED_BAD_CONFIG. The only thing that has changed on my computer in the last week is the new version of Android plus possibly updates to Windows 10. And yes, my computer has access to the internet. Below is an image of my emulator when I try to use Chrome to search for "Google". emulator with error message

28条回答
We Are One
2楼-- · 2019-01-16 06:41

I experienced this same issue after upgrade. Upon opening the Chrome browser in the emulator, google.com could no longer be reached.

I found a post on SO that suggested the problem was with the emulator trying to use a disconnected network adapter. For me the problem was occurring when I was connected to a LAN. Disabling the wireless LAN adapter fixed the issue.

To disable the adapter:

  1. Navigate to Network connections
  2. Find the adapter
  3. Right click and choose disable
查看更多
成全新的幸福
3楼-- · 2019-01-16 06:41

For me the problem was caused when I took my laptop home without restarting the emulator. From what I have read, when the emulator starts up it reads your PC's DNS settings and uses them. When I was on my home network, my work DNS settings were failing.
So yeah. Just restarting the emulator solved my problem.

查看更多
爷、活的狠高调
4楼-- · 2019-01-16 06:42

Maybe you set a proxy for Android Studio and the proxy does not work. Try without proxy.

查看更多
男人必须洒脱
5楼-- · 2019-01-16 06:45

This happend to me when the emulator froze and I had to kill the process. The signal icon always showed the small "x" as in the screenshot and no internet connection was successful.

The only thing that helped was uninstalling and reinstalling the emulator (not the AVD images)

In Android Studio:

Tools-> Android -> SDK Manager Uncheck "Android Emulator" and let it uninstall then check again and let it install again.

Screenshot

查看更多
甜甜的少女心
6楼-- · 2019-01-16 06:45

Had the same issue with my emulator,did everything above but nothing worked. Changing the Default gateway in my Control Panel -> Network and Sharing Center -> Local area connection settings from: 192.168.1.119 to 192.168.1.1 worked from me. I don't have much idea about how this IP Address works,but maybe it will save someone's time and frustation.

查看更多
在下西门庆
7楼-- · 2019-01-16 06:46

if android browser can access internet you can run emulator from terminal by this command

go to SDK path then

$ /tools/emulator -avd Nexus_5X_API_23 -netdelay none -netspeed full

it solve your internet problem...

查看更多
登录 后发表回答