开发者

Android Emulator - Wifi Error

I am using the Android SDK Emulator ad trying to connect to the web. I can not do it a开发者_Python百科s in the settings > Wireless & Networks , Where i need to turn the WiFi On, i get "Error"

How to solve it?

Gorov


  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.


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


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....


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)


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.


I made a factory reset in VS in manage android devices and after that emulator was connected to 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

Android Emulator - Wifi Error


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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜