0

this is my first time facing this kind of problem.

I connected to internet via LAN Cable. Usually, my emulator could access internet without problem, but this time. I can't. I wonder what's wrong with my emulator ?

Thank you.

farissyariati
  • 365
  • 4
  • 9
  • 21

3 Answers3

2

I once had my emulator loose internet connectivity (accessing the host with 10.0.2.2 was working fine). The 3G Icon did not appear.

I don't know what the problem was, but turning on and off airplane mode did the trick. (Press and hold the power button, and select Airplane Mode. Repeat.)

Oren
  • 1,796
  • 1
  • 15
  • 17
0

As already suggested - if it is one application (your own) not having internet access please check the manifest.

If it is all applications check the device instance setup or the emulator setup (Eclipse has views for this) - maybe you have disabled internet/network/cell previously for testing purpose?

Michael Banzon
  • 4,879
  • 1
  • 26
  • 28
  • No. I already add the permission. Since it's application is already run on actual device. – farissyariati Jan 08 '12 at 11:32
  • Try this Run Configurations -> Target and add "-dns-server 8.8.8.8" to Additional Emulator Command Line Options. Taken from: http://stackoverflow.com/questions/2039964/how-to-connect-android-emulator-to-the-internet – pm_labs Nov 02 '12 at 09:05
0

Have you checked your AndroidManifest.xml?

You have to add (or check if you already have) this:

<uses-permission
    android:name="android.permission.INTERNET" />

This user permission allow the application to gain internet access, otherwise you wont access to internet :)

StErMi
  • 5,389
  • 5
  • 48
  • 71