Rikki Tikki Tavi Rikki Tikki Tavi - 26 days ago 6
Android Question

UnknownHostException at the android emulator

I've got an UnknownHostException in my android application when I want to get to my web service.

I inserted an

<uses-permission android:name="android.permission.INTERNET" />
at my AndroidManifest.xml.

If I go to my link of webservice via browser it's going fine.

I typed the domain name and IP at the

But if I run application via emulator I got an UnknownHostException. As I understand, emulator should use my system files to connect with the server...But, practically it doesn't..Help please with this issue.


Problem solved using such domains as


Everything works fine with it. I can't edit hosts file in android file system even with root rights. So if you have similar problem - good solution is to use IP addresses, not domains.

Thanks to Haresh Chaudhary