This code doesn\'t work:
URL url = new URL( xmlPath );
InputSource input = new InputSource( url.openStream() );
all the time, res
issue resolved
run cd C:\Program Files\Android\android-sdk\tools
run android list avd in cmd returns list of ur availabe avd.... in my case its Myabc_avd
run emulator @Myabc_avd -dns-server 8.8.8.8 in cmd ...avd will show avd go to avd's browser and type www.google.com will show google page. u can now access browser using hostname like myfrstapp.com
if all go well then u can run ur project using eclipse but make sure it is running in avd which is running from cmd.
In my case i have just restarted the Emulator and it worked.
In my case I was using host name based URL with HttpURLConnection. However, using an IP based url, resolved the issue. I also deleted/recreated the AVD but that didn't help.
It's so simple. No need of Restart eclipse OR delete and creating Emulator, you just need to follow the steps given below:
That's it...
My problem was when sharing the internet from the computer via WIFI, after ethernet connection was lost and reconnected I couldn't achieve connection on the phone. This was fixed by restarting internet sharing on computer.
Hope it helps someone.