2

My machine is using a WiFi connection for internet, and the LAN card is idle. it's not behind a proxy or firewall, but somehow, my emulator's browser isn't loading any page. meaning that the emulator can't connect to the internet.

I searched a lot but with no luck. what might be the possible reasons?

Please help.

Thanks in Advance!!

  • I read a lot of articles saying what to do if emulator is behind a proxy or if any DNS server is missing, i tried them all but none of them worked. –  Nov 02 '10 at 13:08
  • Just loaded your homepage on a similar setup as you're describing with out any problems. Running on Ubuntu, Android SDK Tools, revision 6 without any modifications as far as I remember –  Nov 02 '10 at 20:51
  • IT just works with Ubuntu. I know. doesn't throw any problems. But I am on Windows 7 32-bit!! –  Nov 03 '10 at 04:28
  • On Windows: if it has ever worked before, then try a reboot - that fixed it for me! – Dan J Nov 07 '11 at 21:00

7 Answers7

4

I had the same problem with OS X. I have been working for 2 days now to get the emulator to connect to the internet, all solutions I have read so far (use -dns-server, use proxy settings or disable unused netword devices) didn't work.

This morning I started the emulator with sudo ./emulator -avd my_avd_name and it worked! Emulator was able to connect to the internet.

So there is something wrong with privileges or so, I need to figure this out. But it works for the moment.

Nachtfrost
  • 447
  • 2
  • 5
2

In Windows, run the AVD Manager with administrator privileges. It worked for me.

1

I have searched long and hard for an answer to this question. From what I gather Google did that on purpose once people started using emulators to add spam comments to the market. However, I did find a guy who had done it and was willing to share the required images.

NOTE: It looks like it's just going to fix the market. But the market won't run without internet, so if the market is fixed, the browser internet will work too. I downloaded the linked files myself and it showed the internet in the browser perfectly.

John
  • 15,418
  • 12
  • 44
  • 65
  • I wasn't searching how to run market on emulator, but my problem is that the internet itself isn't working!!! :-P –  Nov 03 '10 at 04:26
  • @Sheikh Aman: On this emulator the internet runs too. On mine anyway. Try things before you downvote them! –  Nov 03 '10 at 14:42
0

Just right click your eclipse.exe file and click "run as administrator" then whenever emulator will start from eclipse while running your app then you will be able to access internet inside it..it will use host's internet so that should be on..if you are using command line environment then do same with your command prompt ..(this is for windows)..there is no need of proxy or dns setting etc..i dont know about other platforms but it worked for me in windows.. hope this helps :)

0

Open up a terminal on the development machine and trying resolving and pinging by name and by ip various known-good internet hosts.

Then open up an adb shell to the emulator and try the same things from there

  • ridiculously I don't know how to do that! :-P –  Nov 03 '10 at 04:28
  • Well, you should probably spend some time on developer.android.com then –  Nov 03 '10 at 04:54
  • Well.. i read the doc (as u had suggested) and tried to ping www.google.com on 209.85.231.104 by my computer, it worked. but when i executed this (ping) from the emulator shell, it didn't work. my computer has many ports blocked. I came to know that adb server uses port 5037 to listen to requests made by clients. if its blocked, then emulator might not work, right? am i going in the right direction? –  Nov 03 '10 at 06:23
  • If you got the adb shell that is probably working... but these "many ports blocked" might be related to your problem in accessing the network. You may need to reconsider whatever firewall you are running and make sure it isn't interfering with outbound traffic. –  Nov 03 '10 at 06:35
  • Thanks Chris. I had windows firewall and Kaspersky firewall running, I turned both of them off, re-downloaded 2.2 platform, asked network admin to open port 5037; still its not working :'-(( –  Nov 03 '10 at 09:19
  • should I ask for any particular port to be opened? its working on my colleague's ubuntu machine! –  Nov 03 '10 at 09:40
  • Then perhaps you should install ubuntu. There's a degree of convenience in having a development machine that is a close cousin of your development target anyway. –  Nov 03 '10 at 15:21
  • While if you want to stay with windows, I'd suggest that it is the responsibility of the admin who has locked down your machine to figure out how to get it working again enough for your to do your job (possibly by giving you a clean, plain windows install having none of what IT typically adds or changes). Generally, I'm not in favor of IT administering development machines for this reason. If they are really protective of "their network" have them get a cheap linksys router to put you behind. –  Nov 03 '10 at 15:27
0

I don't know what happened, but I disabled the USB WiFi dongle and switched to a cabled network, and it started working. don't know what the reasons were, but I am happy now that it worked.

May be this is useful to others too!

Aman Alam
  • 11,231
  • 7
  • 46
  • 81
0

I have Disable all the other WiFi & LAN connections. Make only single connection enable, with which you have to work with. [Check the connections from "Network Connections"] & Restart the machine works for me.

Kamal Trivedi
  • 239
  • 3
  • 10