简体   繁体   English

模拟器无法连接到互联网

[英]Emulator unable to connect to internet

My machine is using a WiFi connection for internet, and the LAN card is idle. 我的机器正在使用WiFi连接进行Internet连接,并且LAN卡处于空闲状态。 it's not behind a proxy or firewall, but somehow, my emulator's browser isn't loading any page. 它不在代理服务器或防火墙后面,但是以某种方式,我的模拟器的浏览器没有加载任何页面。 meaning that the emulator can't connect to the internet. 表示仿真器无法连接到互联网。

I searched a lot but with no luck. 我搜寻了很多,但没有运气。 what might be the possible reasons? 可能是什么原因?

Please help. 请帮忙。

Thanks in Advance!! 提前致谢!!

I had the same problem with OS X. I have been working for 2 days now to get the emulator to connect to the internet, all solutions I have read so far (use -dns-server , use proxy settings or disable unused netword devices) didn't work. 我在OS X上遇到了同样的问题。我已经工作了2天,以使仿真器连接到互联网,到目前为止,我已经阅读了所有解决方案(使用-dns-server ,使用代理设置或禁用未使用的netword设备)没有用

This morning I started the emulator with sudo ./emulator -avd my_avd_name and it worked! 今天早上,我使用sudo ./emulator -avd my_avd_name启动了模拟器,它成功了! Emulator was able to connect to the internet. 仿真器能够连接到互联网。

So there is something wrong with privileges or so, I need to figure this out. 因此,特权左右存在问题,我需要弄清楚这一点。 But it works for the moment. 但这暂时有效。

In Windows, run the AVD Manager with administrator privileges . 在Windows中,以管理员权限运行AVD Manager It worked for me. 它为我工作。

I have searched long and hard for an answer to this question. 我一直在努力寻找这个问题的答案。 From what I gather Google did that on purpose once people started using emulators to add spam comments to the market. 根据我的收集,一旦人们开始使用仿真器向市场添加垃圾评论,Google就会故意这样做。 However, I did find a guy who had done it and was willing to share the required images. 但是, 我确实找到了一个愿意这样做并愿意分享所需图像的人。

NOTE : It looks like it's just going to fix the market. 注意 :看来这将解决市场问题。 But the market won't run without internet, so if the market is fixed, the browser internet will work too. 但是,如果没有互联网,市场就不会运转,因此,如果市场是固定的,那么浏览器互联网也可以使用。 I downloaded the linked files myself and it showed the internet in the browser perfectly. 我自己下载了链接文件,它在浏览器中完美显示了Internet。

只需右键单击eclipse.exe文件,然后单击“以管理员身份运行”,然后每当模拟器在运行应用程序时从eclipse启动时,您就可以访问其中的Internet。它将使用主机的Internet,因此应该打开。如果您使用的是命令行环境,请在命令提示符下执行同样的操作..(这是针对Windows的)..不需要代理或dns设置等。我不知道其他平台,但它在Windows中对我有用。 。 希望这可以帮助 :)

Open up a terminal on the development machine and trying resolving and pinging by name and by ip various known-good internet hosts. 在开发机器上打开一个终端,然后尝试通过名称和ip各种知名的Internet主机进行解析和ping。

Then open up an adb shell to the emulator and try the same things from there 然后向模拟器打开adb shell,然后从那里尝试相同的操作

I don't know what happened, but I disabled the USB WiFi dongle and switched to a cabled network, and it started working. 我不知道发生了什么,但是我禁用了USB WiFi加密狗并切换到有线网络,它开始工作。 don't know what the reasons were, but I am happy now that it worked. 不知道是什么原因,但是我很高兴现在它起作用了。

May be this is useful to others too! 也许这对其他人也有用!

I have Disable all the other WiFi & LAN connections. 我已禁用所有其他WiFi和LAN连接。 Make only single connection enable, with which you have to work with. 仅启用必须使用的单个连接。 [Check the connections from "Network Connections"] & Restart the machine works for me. [从“网络连接”中检查连接”,然后重新启动机器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM