Use URL on Android throws IOException: Malformed ipv6 address
<p>I want to send the data on the android emulator to the local host web, and get some results.</p>

<pre><code>String temp = "http://10.0.2.2:8888/json/rec?user_data=" + user_data + "&amp;friends=" + friends;
URL url = new URL(temp);

HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setReadTimeout(5000);
InputStreamReader is = new InputStreamReader(urlConnection.getInputStream(), "UTF-8");
String output = "";
while(is.ready()) {
    output += is.read();
}
</code></pre>

<p>Here is the exception.</p>

<pre><code>java.io.IOException: Malformed ipv6 address: [10.0.2.2:8888]
</code></pre>

<p>Why it said that?
Could someone help me?
Thanks in advance.</p>
