My android emulator can’t access the internet. It is connected to the “network”. It can see machines/servers in the local network, but nothing beyond that. I can see the 3g icon at the top right.
From my code I’m trying to download something from a server on the Internet and I’m getting UnknownHostException. I have the android.permission.INTERNET set in the manifest, but obviously that is not the issue since not even the OS’s browser can open websites. I think I can’t expect my code to be able to access the Internet if not even the browser can.
After all my googling most people keep talking about configuring a proxy, but I’m not connected to the internet using a proxy in the computer. Is this something that needs to be set up anyway ? Any other settings that need to be checked ?
Do you have more than one network
card in your computer? (ie an
ethernet and wireless)? If so, go
into your network settings and
disable the one you aren’t using.
Even if its not currently connected
to anything.
Do you use something like Norton Internet Security? If you disable it, does the emulator internet work?
You also might have a DNS issue: you
can try within Eclipse ->Run
Configurations -> Target and add
“-dns-server X.X.X.X” where X.X.X.X
was the IP address for your DNS
server.
If win7, start emulator with admin
privledges
on mac, If you are on Mac – try
this –
1.GoTo Apple Icon -> System Preferences -> Network
2.Click on the gear icon on the and select ‘Set Service Order’
3.Bring the active interface before other interface.
4.Restart the Android Emulator.
and other useful things to try from: How to connect android emulator to the internet