Android 警告:未找到 dns 服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12224762/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Warning: no dns servers found
提问by Tapan Desai
I want to access internet in my android emulator for which i have manually entered dns setting as mentioned in the following link How to set Internet options for Android emulator?
我想在我的 android 模拟器中访问互联网,我手动输入了以下链接中提到的 dns 设置 如何为 Android 模拟器设置互联网选项?
but still when i start the emulator it show the warning that no dns server found and hence there is no internet connectivity in my android emulator. How can i solve this problem.
但是当我启动模拟器时,它仍然显示没有找到 dns 服务器的警告,因此我的 android 模拟器中没有互联网连接。我怎么解决这个问题。
回答by Tapan Desai
In Eclipse:
在日食中:
Window>Preferences>Android>Launch
窗口>首选项>Android>启动
Default emulator options: -dns-server 8.8.8.8,8.8.4.4
默认模拟器选项:-dns-server 8.8.8.8,8.8.4.4
回答by Martin Zeitler
I tried the above method, but had no effect unless setting a name-server on the host OS (Linux):
我尝试了上述方法,但除非在主机操作系统(Linux)上设置名称服务器,否则没有任何效果:
nano /etc/network/interfaces
auto eth0
dns-nameservers 8.8.8.8 8.8.4.4