title: Java HttpClient cannot parse IP address in Android
body: <p>Edited: fixing mistake in the uri</p>
  
  <p>I'm using an instance of org.apache.http.client.HttpClient to connect to a REST based web service on a local network:</p>
  
  <pre><code>String uri = "http://192.168.0.101:8888/someinstance/someresource?name=blah&amp;age=blah";
  final HttpGet request = new HttpGet(uri);
  final HttpClient httpClient = new DefaultHttpClient();
  final HttpResponse response = httpClient.execute(request);
  </code></pre>
  
  <p>This is working fine on an HTC Incredible with 2.3.3 but on an HTC Wildfire with 2.2.1 leads to an IllegalArgumentException with the message: Target host must not be null.</p>
  
  <p>If I use a uri using a host name rather than IP address the problem does not occur. For example the following executes with no errors:</p>
  
  <pre><code>String uri = "http://www.somehost.com:8888/someinstance/someresource?name=blah&amp;age=blah";
  </code></pre>
  
  <p>Can anyone advise what I'm doing wrong. Assuming I have to use an IP address is there any way round this?</p>
  
  <p>Thanks for any advice.</p>