No internet access on Android Emulator, Shared Internet Connection

房东的猫 提交于 2019-12-01 21:15:41

问题


I have Installed Eclipse Juno and Updated the ADT as well to 22.0, I have created a custom AVD of Android 2.3 version as is working fine, but it seems there is no internet connection on my Emulator,

Note: It also shows the 3G symbol on the title bar. Look the image of my emulator given below.

Also worth noting, I connect to Internet via DSL internet cable right into my NIC card, and I also share my internet via wifi with my room-mates via connectify pro Hostspot. In this situation there is no internet connection on my Emulator.

But when I connect to the shared Internet of my friend's Connectify hotspot then it works fine.

I want to resolve this issue, I think it's because of sharing the internet connection.


回答1:


Finally I sorted out my problem.

It was problem due to dns server address.

I did below steps

  1. open CMD
  2. Goto your android-sdk/tools path, Like my path is G:\Andriod Development\android-sdk\tools
  3. type this command G:\Andriod Development\android-sdk\tools>emulator.exe -avd Android_2.3.3 -dns-server 8.8.8.8 -scale 0.75

here Android_2.3.3 is your AVD name, -dns-server 8.8.8.8 will set your DNS address to 8.8.8.8 or 8.8.8.8:55 and -scale will scale your AVD to specified value.

this will start a new emulator. Enjoy :)

Hope may be helpful to others



来源:https://stackoverflow.com/questions/17252278/no-internet-access-on-android-emulator-shared-internet-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!