Android 模拟器 - Wifi 错误

发布于 2024-10-14 23:40:11 字数 111 浏览 8 评论 0原文

我正在使用 Android SDK 模拟器广告尝试连接到网络。我无法按照设置>中的方式进行操作无线与网络,在我需要打开 WiFi 的地方,出现“错误”

如何解决?

戈罗夫

I am using the Android SDK Emulator ad trying to connect to the web. I can not do it as in the settings > Wireless & Networks , Where i need to turn the WiFi On, i get "Error"

How to solve it?

Gorov

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

治碍 2024-10-21 23:40:11
  1. 关闭模拟器。
  2. 关闭以太网、火线和任何其他网络接口。所有的人。我的意思是完全关闭它们,例如在 Mac 上,打开“系统偏好设置”>“网络>以太网>配置>离开。仅拔掉以太网电缆是不够的。
  3. 启用 Wifi 并验证其是否正常工作。
  4. 启动 Android 模拟器。

现在,它应该在状态栏中显示一个 3G 图标(或类似图标),并且您现在应该能够上网冲浪。

  1. Shut down the emulator.
  2. Turn off Ethernet, Firewire, and any other network interfaces. All of them. And I mean completely shut them off, e.g. on a Mac, open System Preferences > Network > Ethernet > Configure > OFF. Simply unplugging the Ethernet cable is not enough.
  3. Enable Wifi and verify it works.
  4. Launch the Android emulator.

It should now display a 3G icon (or similar) in the status bar, and you should be now able to surf the web.

耳根太软 2024-10-21 23:40:11

请参阅控制模拟器

在模拟器中按 F8,这应该会启用您的数据连接。很奇怪,有时启动模拟器时连接会被禁用。

问候

Look at Controlling the Emulator.

Press F8 in the emulator, this should enable your data connection. It's weird, sometimes the connection is disabled when you start up the Emulator.

Regards

美男兮 2024-10-21 23:40:11

我认为,如果您在将互联网连接连接到计算机后启动模拟器,有时模拟器将无法连接到互联网...尝试先连接互联网,然后启动模拟器...

I think, sometimes emulator wont connect to internet if you start the emulator after connecting your internet connection to the computer... try connecting the internet first and then starting the emulator....

伊面 2024-10-21 23:40:11

在 Android 模拟器上启用 WifiAndroid:在模拟器中模拟 WiFi?,模拟器根本不支持此功能。如果你想要wifi,你需要一个真正的设备。

正如这个问题中的其他人所说,您通常可以访问互联网:无论您的计算机使用有线还是无线网络,都可以配置模拟器的“3G”或“4G”以从主机拉出网络。但模拟器内部的“WiFi”无法正常工作。

(这个问题可能是重复的。即使我引用的两个问题中的后者也几乎是另一个问题的重复)

As stated in Enabling Wifi on Android Emulator and Android: Simulate WiFi in the emulator?, this simply isn't supported in the emulator. If you want wifi, you need a real device.

As other people in this question have stated, you can access the internet in general: whether your computer is using a wired or wireless network, it's possible to configure your emulator's "3G" or "4G" to pull the network from the host machine. But the emulator-internal "WiFi" can't work correctly.

(this question is probably a duplicate. Even the later of the two questions I referenced is almost a duplicate of the other)

梦旅人picnic 2024-10-21 23:40:11

您不需要“打开”AVD 的 WiFi。它应该可以使用您的计算机的互联网连接工作。当我的 AVD 上的 wifi 停止工作时(我需要重置我的 AVD),以下是对我有用的方法:

  • 关闭 AVD 并确认它没有运行
  • 在 Android Studio 中打开 AVD 管理器(工具 > AVD 管理器)
  • 单击模拟器右侧
  • 单击“擦除数据”
  • 确认计算机上的互联网正常工作,然后重新启动 AVD

我有时会出现此问题,但在完成上述步骤后,它会再次出现。

You shouldn't need to "turn on" the wifi of the AVD. It should work using your computers internet connection. Here is what worked for me when wifi on my AVD stops working(I needed to reset my AVD):

  • Close AVD and confirm it is not running
  • Open AVD Manager in Android Studio (Tools > AVD Manager)
  • Click on the dropdown arrow on the right side of the emulator
  • Click "Wipe Data"
  • Confirm the internet on your computer is working then re-launch AVD

This issue recurs for me sometimes but after I complete the above steps it works again.

如此安好 2024-10-21 23:40:11

以下解决方案在大多数情况下都有效。

关闭模拟器->关闭笔记本电脑wifi->在android studio中打开AVD Manager->对所需的模拟器执行冷重启 ->模拟器完全重启后,打开笔记本电脑的wifi

经过上述步骤,它可以工作。请参阅下图进行模拟器冷启动

在此处输入图像描述

Below solution worked in most of the cases.

close emulator->Switch off laptop wifi -> open AVD Manager in android studio-> Perform cold reboot of required emulator ->After emulator reboot completely,switch on laptop wifi

After above steps,it works.Please find below image for emulator cold boot

enter image description here

红颜悴 2024-10-21 23:40:11

我在管理Android设备的VS中进行了出厂重置,然后模拟器连接到了wifi!

I made a factory reset in VS in manage android devices and after that emulator was connected to wifi!

瑕疵 2024-10-21 23:40:11

我在使用Win7的时候也遇到过这个问题。
我不得不切换到有线连接,因为似乎没有任何效果。

F8确实是打开/关闭网络的关键,但它对我来说不起作用。

后来我切换到Ubuntu,但没有测试模拟器是否可以在Ubuntu上使用wifi。

I have also encountered this problem when I was using Win7.
I had to switch to a wired connection as nothing seemed to be working.

F8 is indeed the key to turn network on/off, but it just didn't work for me.

I later switched to Ubuntu, but didn't test whether emulator works with wifi on Ubuntu.

一片旧的回忆 2024-10-21 23:40:11

对我有用的是拔掉以太网电缆并启用 Wi-Fi 连接。似乎两者都混合了。

我的电脑使用 MAC,我正在使用 Eclipse。

What worked for me was to unplug my ethernet lan cable and enable my Wi-FI connection. Seems it was mixing both.

My computer uses MAC and I was working with Eclipse.

莫多说 2024-10-21 23:40:11

您无法在模拟器中打开 Wi-Fi。当在防火墙或代理后面工作时,这是一个特别棘手的问题。

然而,在某些情况下,仅使用以太网或 Wi-Fi 之一可能会有所帮助。

但是,如果您可以正确配置 APN,则可以通过模拟器连接到互联网。

You can't switch the Wi-Fi ON in the emulator. This is a particularly tricky issue when working behind a firewall or a proxy.

In some cases, however, using only ONE of ethernet or Wi-Fi might help.

But you can connect to the internet through the emulator if you can configure the APNs properly.

长亭外,古道边 2024-10-21 23:40:11

另一个可能的原因是:检查计算机上的 DNS 设置。

结果我仍然在计算机 WiFi 属性中设置了工作中的 DNS 服务器(不是模拟器 WiFi 设置)。一周以来一切都工作正常,包括模拟器直到今天。只有模拟器停止工作,其他一切仍然能够连接。擦除数据、冷启动和重新启动笔记本电脑都没有帮助。

从 WiFi 属性中删除所有 DNS 服务器、擦除数据并进行冷启动最终使其再次工作。您可能还想更新 DHCP。

Yet another possible cause: Check the DNS settings on your computer.

Turns out I still had the DNS server from my work set in the computers WiFi properties (not the Emulator WiFi settings). Everything has been working fine for a week, including the emulator until today. Only the emulator stopped working, everything else was still able to connect. Wiping data, cold booting and restarting the laptop didn't help.

Removing all DNS servers from the WiFi properties, wiping data and doing a cold boot finally made it work again. You might wanna do a DHCP renew as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文