It's been a while since I opened android studio. It's all good until today. Today the android emulator can't connect to the internet (tried with chrome browser and my application in the emulator), altough it's wifi is connected. How to fix this?
I already tried:
emulator wifi settings (auto ip / dhcp): Nexus 5S Api 28
Is there a possibility I accidentally uninstall something important / removing network adapter in the 'Control Panel\Network and Internet\Network Connections' ? ( there is only one adapter in there )
Images:
答案 0 :(得分:2)
找到解决方案
your_path_of_android_sdk \ tools \ emulator -avd -dns-server 8.8.8.8,但失败,并显示以下消息:PANIC:缺少“ x86”的模拟器引擎程序
确实有效!但是我必须在“模拟器”文件夹中使用emulator.exe,而不是在“工具”文件夹中使用emulator.exe
完整的命令是: F:\ AndroidSDK \ emulator> emulator -avd Nexus_5X_API_28_x86 -dns-server 8.8.8.8
其中Nexus_5X_API_28_x86是我的Android模拟器名称(在android studio的avd管理器中找到)。
答案 1 :(得分:0)
我面临着同样的问题。因此,当在外部网络中使用模拟器时,该模拟器正在工作,然后在我的家庭网络中,同一模拟器没有显示互联网。可能的原因是由于DNS。
但是我选择的解决方案是启动仿真器,关闭Wi-Fi并关闭仿真器的数据连接。然后再次打开两者,看看它最终将连接到Internet。