why my android studio emulator is not connected to internet code example

Example: android emulator wifi connected without internet

May be a VPN problem, disconnect from it

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

Tags:

Cpp Example