Android Newbie: java.net.UnknownHostException

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" />
  • http://www.manybots.com/ Niko Roberts

    Good to see a developer of your quality being platform agnostic. I am getting tired of running into zealots who can’t stand anything else except their brand of hardware (from all sides)

    • jaysonlane

      Thanks Niko! Yeah slowly but surely I’m trying to familiarize myself with Android and actually just installed Visual Studio via Parallels earlier this week so maybe delving into the Windows Phone world soon!