It is common for developers who are new to Android to encounter problems with the emulator connecting to external websites. The first thing I did was to include the
<uses-permission android:name="android.permission.INTERNET" />
tag in my AndroidManifest.xml file which, turned out not to be the solution since my app still could not access external websites. To confirm that your app is not the culprit for your internet connection woes, try to open the browser app of the emulator and surf to any well known sites like Google.
If it cannot access it, then the emulator does not have any connection at all. To make this work, try doing the following steps in your Eclipse IDE.
- Go to Window > Preferences > Android > Launch
- Under the default emulator options, add this -dns-server 220.127.116.11,18.104.22.168
It worked for me.