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 the case here, my machine (Windows 7) is directly connected to the router.
标签:
android-emulator
相关问题
- Android Studio 3.0 Canary 4 Emulators Stuck in Reb
- Start android emulator adb from Jenkins in windows
- connect error of socket programming via ndk
- getViewByID Returns null for the Listview
- android gridlayout not showing in emulator API 22
相关文章
- Installation error: INSTALL_FAILED_INSUFFICIENT_ST
- Testing in “Airplane” mode in Android Emulator
- Android emulator - error while loading state for i
- SDK Manager is missing older Android System images
- How to know which android devices support video pl
- Preventing “flickering” when calling Drawable.draw
- Download Android kernel source code
- Android Facebook Integration Invalid Key hash erro
If you're on MacOS with 2.2 and you keep seeing an error about data connectivity, try the above, it works.
It starts working at the office. Phew.
I think some of the answers may have addressed this, however obliquely, but here's what worked for me.
Assuming your problem is occurring when you're on a wireless network and you have a LAN card installed, the issue is that the emulator tries to obtain its DNS settings from that LAN card. Not a problem when you're connected via that LAN, but utterly useless if you're on a wireless connection. I noticed this when I was on my laptop.
So, how to fix? Simple: Disable your LAN card. Really. Just go to your Network connections, find your LAN card, right click it and choose disable. Now try your emulator. If you're like me, it suddenly ... works!
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 encounter this issue when I first run the simulator, I solved it by setting the dns server with
get the current dns server of simulator
10.0.2.3
Then set it to my lan dns server
My platform: Mac OS 10.6.4 Eclipse: 3.6
I had a similar problem where my map app background was grey (no tiles) and the browser was unable to connect to the internet.
Within Eclipse I went to Run Configurations -> Target and added "
-dns-server X.X.X.X
" and everything worked fine afterwards. (obviouslyX.X.X.X
was the IP address for my DNS server).If you are on Mac - try this -