Android Studio - Android Emulator Wifi Connected with No Internet

前端 未结 21 1502
伪装坚强ぢ
伪装坚强ぢ 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 13:54

    Maybe try using LAN if available. That works as a charm for me...

    0 讨论(0)
  • 2020-11-27 13:55

    Well, I did it this way:

    Steps to add manual proxy:

    1. Go to Emulator settings
    2. Go to Proxy tab
    3. Set Manual proxy configuration
    4. Add your Host name & Port number
    5. Click on Apply

    Reference screen shot:

    Hope it helps.

    0 讨论(0)
  • 2020-11-27 13:56

    I have solved with google dns on network adapter 8.8.8.8 and 8.8.4.4

    0 讨论(0)
  • 2020-11-27 13:56

    Solution for Windows:

    1. Go to your Android SDK Location, E.g.: C:\Users\shehzad\AppData\Local\Android\Sdk\emulator.
    2. Open Command Prompt on same location. Write this command: emulator -avd Nexus_4_API_29 -gpu host -dns-server 8.8.8.8. Here Nexus_4_API_29 will be your emulator device name (You can find it out devices list from Android Studio -> AVD Manager). This command will run your specified device and WIFI will have Internet connected.

    Hope this helps.

    0 讨论(0)
  • 2020-11-27 13:58

    100% Working on Windows 10

    Android AVD come with Google DSN configured inside emulators. So we need to set same to network sharing for accessing same.

    Google Public DNS IP addresses The Google Public DNS IP addresses (IPv4) are as follows:

    8.8.8.8

    8.8.4.4

    The Google Public DNS IPv6 addresses are as follows:

    2001:4860:4860::8888 2001:4860:4860::8844 You can use either address as your primary or secondary DNS server.

    More Info

    Here I show for setting v4 IP steps

    1. Open Network and Sharing Center
    2. Right Click on current internet connection
    3. Select Properties
    4. Double Click on Internet Protocol Version 4 (TCP/IPv4)
    5. Select Use the following DNS server address
    6. Set the Preferred and Alternate DNS server
    7. Prefered DNS Server : 8.8.8.8
    8. Alternate DNS Server : 8.8.4.4
    9. Click on OK
    10. Restart Android AVD

    Note : If VPN is enabled then it will not work need to disconnect your VPN

    0 讨论(0)
  • 2020-11-27 13:59

    On Windows :

    After testing some solutions, I found my one by clicking the down arrow on the AVD, option "Cold Boot Now". after booting, Android had access to internet so it worked for me.

    0 讨论(0)
提交回复
热议问题