使用Volley发出第二个网络请求后,我总是收到此错误。我输入的网址是什么似乎并不重要。 Volley总是声称它是畸形的。
try {
RequestQueue queue = Volley.newRequestQueue(getActivity());
StringRequest sr = new StringRequest(Request.Method.GET, "http://27.67.80.6:18080/154.m3u8?AdaptiveType=HLS&VOD_RequestID=U6tIRX+QtmFBXhLTgqa7ueyBtmHx5QAI3mRpdZ2Q7ux7K53vZQMpmfIQhMqTkuSfjDtGu7YlgP0t/EorYPdiLw==", new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Log.e("Data",""+response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.e("Loi",""+error);
}
}) {
@Override
protected Map<String, String> getParams() {
Map<String, String> params = new HashMap<String, String>();
params.put("DNT","1");
return params;
}
};
queue.add(sr);
} catch (Exception e) {
}
然后我看到以下错误:
com.android.volley.VolleyError: java.lang.RuntimeException: Bad URL http://27.67.80.6:18080/154.m3u8?AdaptiveType=HLS&VOD_RequestID=U6tIRX+QtmFBXhLTgqa7ueyBtmHx5QAI3mRpdZ2Q7ux7K53vZQMpmfIQhMqTkuSfjDtGu7YlgP0t/EorYPdiLw==
有没有人有任何想法?
答案 0 :(得分:0)
Try using another URL, the URL you are using gives the following error!