错误提示:Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
打印了一下url的值,http://协议头没有,只剩下字符串的中间部分,
URL url = null;
InputStream in=null;
Log.d("tag",""+params[0]);
try {
url = new URL(params[0]);
} catch (MalformedURLException e) {
e.printStackTrace();
}
怎么解决啊,纠结半天了
使用字符串给url赋值,url得到的值和字符串不相同
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-