Search This Blog

14 April 2012

Unknown Host Exception

I spent an hour trying to figure out why my little 1-page test app was throwing an UnknownHostException but the browser was working. To make matters worse, there was a red herring in that I could not ping from adb shell.

Turns out it was a stupid ommission. If you are having this problem, don't forget to add this to your AndroidManifest:

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