Android Studio - Android Emulator Wifi Connected with No Internet

前端 未结 21 1955
伪装坚强ぢ
伪装坚强ぢ 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:17

    Stated below are the solutions for Windows and Mac, but similar solutions will work on any OS:

    1. On Windows

      • Open Network and Sharing Center and click on current Connection
      • Click on Properties
      • Double Click on Internet Protocol Version 4 (TCP/IPv4)
      • Set the Preferred and Alternate DNS servers as (Screenshot below) :

        8.8.8.8
        8.8.4.4
        
    2. On Mac

      • Go to Settings > Network > Advanced... > DNS
      • Delete whatever entries you have there and add these two entries (Screenshot below):

        8.8.8.8
        8.8.4.4
        

        Note: For Mac users, if the entries field is disabled and you're not able to edit it, click on the 'Lock' icon in the bottom area of that window and enter the password to be able to make changes

    Restart the emulator, and it should solve:

    Screenshots:

    1. Windows

    1. Mac


    Edit: This is the fix for a situation when the emulator's wifi has changed the DNS to some non-working DNS. While this works most of the time, there might also be other reasons which may not fix from this solution.

提交回复
热议问题