No internet connection for Visual Studio Android Emulator(Visual Studio Android 模拟器没有互联网连接)
问题描述
我正在使用 Visual Studio 2015 附带的 Android Emulator.当我运行它时,在 Android 的 Wi-Fi 设置中,此状态显示为 Obtaining IP Address.. for Wired eth1代码>网络.但是时间长了就失效了.
I'm using Android Emulator that comes with Visual Studio 2015. When I run it, in Wi-Fi settings of Android this status appears Obtaining IP Address.. for Wired eth1 network. But it fails after a long time.
- 在运行模拟器之前移除了
Hyper-V的Virtual Switch Manager中的所有virtual switch. - 代理设置中未选中
自动检测设置 - 尝试了不同的 API 级别(19,22,..)
- Windows Phone Emulator 没有这个问题,并且有互联网连接.
- 重新启动我的电脑!
当我诊断出 vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) 时,它说它的 IP 地址无效.同样在 android 模拟器中,它会尝试获取 IP.显然我需要给模拟器一个有效的IP,但我不知道如何或在哪里或什么价值.
When I diagnose vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) it says it has an invalid IP address. Also inside android emulator it tries to obtain an IP. Obviously I need to give the emulator a valid IP, but I don't know how or where or what value.
如何让安卓模拟器上网?提前致谢.
How to give the Android emulator internet access? Thanks in advance.
推荐答案
Android 似乎无法从 DHCP 获取 IP 地址.
It looks like Android is unable to acquire an IP address from DHCP.
在 Hyper-V 管理器 (virtmgmt.msc) 中,为您尝试启动的模拟器配置文件选择 VM,然后转到其 Settings...(右键单击上下文菜单或查看右侧的操作窗格).
In Hyper-V Manager (virtmgmt.msc), select the VM for the emulator profile you are trying to start and go to its Settings... (right click for context menu or see action pane on right side).
在Hardware下,确保有两个虚拟交换机:
Under Hardware, make sure there are two virtual switches:
模拟器内部网络适配器模拟器外部网络适配器
Emulator External Network Adapter 必须列为第二个适配器——顺序很重要.如果它们的顺序不正确,请删除外部适配器并重新创建它,并为其提供与以前相同的设置.您可以通过单击 VM 硬件列表中的 Add Hardware 来创建它.
Emulator External Network Adapter must be listed as the second adapter -- the order matters. If they are ordered incorrectly, delete the External adapter and recreate it, giving it the same settings it had before. You can create it by clicking Add Hardware in the VM's hardware list.
这篇关于Visual Studio Android 模拟器没有互联网连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Visual Studio Android 模拟器没有互联网连接
基础教程推荐
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
