简体   繁体   English

Android模拟器无法访问互联网

[英]Android Emulator not able to access internet

I'm using Android studio, I have set up the emulator through the AVD and everything is working fine except the fact that the emulator can't access the internet at all. 我使用的是Android Studio,已经通过AVD设置了模拟器,并且一切正常,除了模拟器根本无法访问互联网。

I have set up the APN settings, I put the right proxy, port, username, and password but I doubt the "APN NAME" & "SERVER" ; 我已经设置了APN设置,我输入了正确的代理,端口,用户名和密码,但是我怀疑"APN NAME""SERVER" I wrote my company's website url as the Apn name and the server like "www.xxxxxxx.com. 我将公司的网站网址写为Apn名称,并将服务器写为“ www.xxxxxxx.com”。

Actually, the error I get is as the pic below shows: 实际上,我得到的错误如下图所示:

在此处输入图片说明

Any suggestions? 有什么建议么? thanks in advance. 提前致谢。

如果未添加,则向您的清单添加Internet权限,

 <uses-permission android:name="android.permission.INTERNET" />

I know what the problem is, you need to make sure your PC is connected t the Internet and then restart the emulator. 我知道问题出在哪里,您需要确保PC已连接到Internet,然后重新启动仿真器。 Then it will work for you. 然后它将为您工作。

What you are seeing happens because you turn on the emulator before your PC has connected to the Internet. 您所看到的是由于您在PC连接到Internet之前打开了仿真器而发生的。

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

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