Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android emulator loses internet connection after a period of time

I'm having trouble with the android emulator, this one is Android 2.3.3 but i've had trouble with other versions as well.

When i start the emulator everything works great, for a while. But at some point (I don't know how long) it just stops working and i have to restart it.

It happens every time, and restarting it always fixes it. I've tried toggling the network on and off but that doesn't help.

The exception I get in logcat is "java.net.UnknownHostException: foo.com"

Any help would be appreciated! Thanks in advance!

like image 561
Joe Flateau Avatar asked Feb 15 '12 23:02

Joe Flateau


People also ask

How does Android emulator connect to Internet?

Go to your Android\Sdk\emulator folder and open command prompt. Type emulator -list-avds to see available emulator names. Type emulator -avd name-of-your-device -netdelay none -netspeed full -dns-server 8.8. 8.8 command and press enter.

How do I change DNS on Android emulator?

It's Terminal: Fixing the DNS address issue Getting a list of available virtual devices for the Android Emulator. Then run one of the available emulators with the command, “emulator -avd DEVICE_NAME”, followed by the argument “-dns-server 8.8. 8.8”.

Is Android emulator laggy?

Running multiple programs at once on your PC can cause performance issues. While running Android emulator for playing heavy games, you should always avoid using up the RAM of your computer. This will cause severe lag to your PC. You can close unwanted programs by going to "Task Manager".

Why does emulator stopped working?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.


1 Answers

I came across this link while researching the same issue. The DNS server fix worked for me. http://www.gitshah.com/2011/02/android-fixing-no-internet-connection.html

like image 157
Chris S. Avatar answered Oct 12 '22 04:10

Chris S.