Android Newbie: java.net.UnknownHostException

2012-11-08

I’ve been toying with Android a little lately. Today I am working with the Twitter API and got this error:

11-08 15:05:29.461: W/System.err(376): java.net.UnknownHostException: search.twitter.com

You could get this error from any web request. The fix?

Put this line in your AndroidManifest.xml:

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