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".


当前回答

对我来说,这个问题是因为我把笔记本电脑带回家时没有重新启动模拟器。据我所知,当模拟器启动时,它会读取你PC的DNS设置并使用它们。当我在家庭网络上时,我的工作DNS设置失败了。 是的。重新启动模拟器就解决了我的问题。

其他回答

这些答案对我都没用。我可以通过下载“android-studio-2021.1.1.8-mac_arm”来让它工作。之后就不需要额外的步骤了。

对于这个问题,我有一个简单而永久的解决方案。

进入网络和互联网选项->

点击以太网或wifi(你连接的)选项->

单击更改适配器选项->

右键单击已连接的网络。

将打开一个对话框,只需单击Internet协议版本(TCP/IPv4)选项。

弹出另一个对话框,忽略第一组IP地址(保持不变),单击“使用以下DNS服务器地址:”单选按钮,在“首选DNS服务器:”和“备选DNS服务器”中分别输入8.8.8.8和8.8.4.4:

现在你可以随时打开你的模拟器,你会得到互联网在安卓模拟器。

我有visual studio 2017,这简单的几次点击已经修复了Android模拟器的互联网问题。

对我来说,在OSX上,这是因为使用第三方VPN解决方案…它安装了一些avd和Genymotion无法通过的网络钩子。必须卸载它才能正常工作。在某些网络上工作得很好,而在其他网络上则不行……很奇怪…

最后,我不得不删除。android文件夹并创建一个新的。看来文件损坏了