Android Studio - Android Emulator Wifi Connected with No Internet

前端 未结 21 1555
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 13:42

I have wasted a whole day trying out different solutions floating around in SO and other place mentioned to enable wifi on the android emulator but to no avail. Can anybody

相关标签:
21条回答
  • 2020-11-27 14:00

    A simple cold boot worked for me, no need to start other emulators or wiping memory.

    Just close your emulator and select the "Cold Boot Now" option on the drop menu adjacent to the play button. If not look for any of the more comprehensive options listed here, but I suggest always starting with the simplest solution.

    Good luck!

    0 讨论(0)
  • 2020-11-27 14:03

    My solution using Mac OSX 10.13

    I read about it being caused by LAN card and WiFi being enabled, and some approaches seemed complicated to me, so I simply tried this, and it worked:

    • Disabled WiFi on my laptop.
    • Switched off the emulator.
    • Did a cold boot on the emulator (AVD Manager -> on emulator actions -> Cold Boot Now).
    • After reboot with laptop WiFi disabled the emulator showed proper WiFi connection (emulator still shows AndroidWifi but is connected to my laptop internet. WiFi symbol now look like this: WiFi symbol connected)
    • I then enabled WiFi on my laptop and everything worked.
    0 讨论(0)
  • 2020-11-27 14:03

    Maybe this would help someone. I tried all the solutions above. Changing DNS, cold booting, etc. After several hours of trial and error, I went to the official docs, which said that the emulator picks up the DNS config. of host machine at emulator's boot time. I had VMWare installed on my machine, which installs a few network adapters. So, I just changed the DNS config. of all the adapters (including VMWare adapters), and cold booted my emulator. OMG, the problem which didn't seem to go away for hours, just got right!

    Now, what I find odd is, I switched back the DNS config. of all the adapters to auto, and cold booted my emulator again. The WiFi still works just fine. OS: Windows 10.

    0 讨论(0)
  • 2020-11-27 14:05

    Wipe data by right clicking on virtual device list & cold boot works for me..

    0 讨论(0)
  • 2020-11-27 14:09

    What worked for me:

    • Power off the emulator (using its power key)
    • Start your app on ANOTHER emulator and then close it.
    • Now start your app in previous emulator again.
    0 讨论(0)
  • 2020-11-27 14:10

    Change the location of the emulator and set it to your current location.

    • Steps : -

      1. Click on More in emulator options
      2. Go to location
      3. Search your address and click SET LOCATION
    0 讨论(0)
提交回复
热议问题