Solved: android emulator has no internet connection

I remember that I encountered this problem before, but I don’t know what’s the root cause of the issue, today I encounter this problem…

Solved: android emulator has no internet connection
The flowers in a garden

I remember that I encountered this problem before, but I don’t know what’s the root cause of the issue, today I encounter this problem again, and at last find the root cause of the problem.

Tries to solve the problem

I tried several methods to solve the problem, but none works.

  1. Try to Code Boot the emulator.
  2. Try to restart the Android Studio and start the emulator.
  3. Try to restart the OS and start the emulator.

Solution

The root cause of the problem is that we set the proxy in android studio, and started the emulator from android studio, but the proxy setting is not correct.

The solutions for the problem are:

  1. Update the proxy to correct one in Android Studio.
  2. Updated the Android Studio with no proxy.

The problem is that when we start the emulator from Android Studio, the proxy setting in Android Studio will be applied to the emulator.