How can I connect my Android emulator to the internet, e.g. to use the browser? I\'ve found lots of advice on what do to when your connected through a proxy, but that\'s not
I thought I experienced issues with connecting my emulator to the internet but it turned out to be problems with the code I was using. I know its obvious but in the first instance try the browser on the emulator to confirm you have no internet access. I would have saved an hour if I had done that first.
After reading this I decided to look at my "NICs". I put this in quotes because like many I am running virtual nics for devices like Hamachi and Virtual Box. After I disabled Hamachi I am able to use the internet. My guess is that the emulator picks the first available nic regardless of whether it is virtual. Now to find out if I can rearrange my nic order without tearing my box down.
Windows 7 32bit
If you are behind a proxy in the SDK Manager, under Tools -> Options
, do NOT configure the proxy settings.
When you run from the command line add -http-proxy
:
emulator.exe -avd YOUR_AVD_NAME_HERE -http-proxy PROXY:PORT
Worked for me.
I encounter this issue when I first run the simulator, I solved it by setting the dns server with
Library/Android/sdk/platform-tools/adb shell getprop net.dns1
get the current dns server of simulator 10.0.2.3
Then set it to my lan dns server
Library/Android/sdk/platform-tools/adb shell setprop net.dns1 192.168.1.1
I have Mac OS X 10.7.2, Eclipse Helios Service Release 2. I also work via Proxy and my IP settings are via DHCP. I solved this issue firstly using this article http://www.gitshah.com/2011/02/android-fixing-no-internet-connection.html, then I removed Emulator settings and just go to Run->Run Configurations->Target->Additional Emulator Command Line Options and type there -http-proxy xxx.xx.111.1:3128 . Also I would like to say that when I typed also a DNS like this: -dns-server xxx.xx.111.1 -http-proxy xxx.xx.111.1:3128 it did not work, but when I removed DNS it worked. Also I would like to note, that Additional Emulator Command Line Options are not visible without scrolling to the bottom of that window. I also want to note, that when you change emulator options, all apps will work. But If you write Additional Emulator Command Line Options, you need to write them every time for every app target in Run Configurations.
I am not using a proxy...however I am using a script...Is there anyway around this. I am behind a company firewall