如何将我的Android模拟器连接到互联网,例如使用浏览器?我已经找到了很多关于如何通过代理连接的建议,但这里不是这样,我的机器(Windows 7)是直接连接到路由器的。
当前回答
您尝试过使用管理权限启动模拟器吗?它适用于我,我运行的是Windows 7 64bit)
其他回答
在Android模拟器中,打开飞机模式,然后再关闭,对我来说很管用。
谢谢你的指点。他们真的帮了大忙。“防火墙”这个词勾起了我脑海中的一个念头。
我有一台Windows XP电脑,有WIFI连接,没有代理。我有诺顿网络安全运行在我的机器上,它有一个智能防火墙。这个智能防火墙管理程序对网络的访问,包括模拟器.exe。我进入设置->程序控制,然后授予模拟器.exe的完全访问权限。在这之后,我开始Android模拟器和bang…我可以上网。
希望这能对新人有所帮助。
~下垂的
这个问题有不同的解决办法。其中之一,我将向您展示我的实验和结果,使用最近的android studio和2017年下载的AVD图像。
你要做的第一件事是从android工作室启动你的AVD。(在我的情况下,我选择NEXUSAPI25安卓7.1图像) 转到设置->无线和网络->蜂窝网络->接入点->(+)按add ->输入以下如果你没有NTLM代理或代理在所有(这意味着你是直接连接) a.添加apn名称为myAPN B.添加apn服务器=> WWW C.保存并尝试浏览互联网。
如果这不起作用,在你的环境变量中添加“ANDROID_SDK_ROOT”
然后,使用模拟器命令启动AVD,如下所示
模拟器-avd Nexus25 -dns-server 8.8.8.8
对于那些使用NTLM代理的人,接下来我将向您展示它如何为我工作。 将Android_sdk_root路径添加到环境变量中。这使得命令行代码像使用AVD名称一样读取成功。 使用以下命令启动模拟器
>模拟器-avd Nexus_5X_API_25 -http-proxy http://username:password@ipaddress:端口
输入
I have Mac OS X 10.7.2, Eclipse Helios Service Release 2. I also work via Proxy and my IP settings are via DHCP. I solved this issue firstly using this article http://www.gitshah.com/2011/02/android-fixing-no-internet-connection.html, then I removed Emulator settings and just go to Run->Run Configurations->Target->Additional Emulator Command Line Options and type there -http-proxy xxx.xx.111.1:3128 . Also I would like to say that when I typed also a DNS like this: -dns-server xxx.xx.111.1 -http-proxy xxx.xx.111.1:3128 it did not work, but when I removed DNS it worked. Also I would like to note, that Additional Emulator Command Line Options are not visible without scrolling to the bottom of that window. I also want to note, that when you change emulator options, all apps will work. But If you write Additional Emulator Command Line Options, you need to write them every time for every app target in Run Configurations.
右键单击Eclipse中的Project select Run As -> Run Configurations… 选择Android应用程序,然后选择“目标”标签 寻找“附加模拟器命令行选项”并将此命令行放入文本框 -http-proxy http://< username >:< password >@< hostname >:< port > .使用实例
推荐文章
- 在WebView中上传文件
- 如何增加Android模拟器的存储?(INSTALL_FAILED_INSUFFICIENT_STORAGE)
- Android模拟器没有启动,显示“无效的命令行参数”
- 新版本的Android模拟器问题-模拟器进程已终止
- Android模拟器只显示黑屏和adb设备显示“设备离线”
- 在Android Studio的模拟器上截图
- 使Android模拟器运行得更快
- Android Studio错误:“Manifest合并失败:针对Android 12的应用程序”
- 我如何在Android模拟器中“摇动”Android设备以调出开发菜单来调试我的React Native应用程序
- 错误“与adb的连接中断,发生严重错误。”
- 从Android模拟器访问localhost:端口
- Android模拟器在Android Studio中被杀死
- 以编程方式在视图上添加填充
- 如何连接安卓模拟器到互联网
- 模拟器:ERROR: x86仿真目前需要硬件加速