每当我在我的页面上启动提示时,我得到以下内容:'[1] 5.onErrorResponse:错误:' 没有错误消息。然而它在yahoo管道json页面上很愉快地工作,我不明白为什么,我认为我的json有些错误,但我可以发现任何东西?
mRequestQueue = Volley.newRequestQueue(acc);
final String URL = "x";
// pass second argument as "null" for GET requests
JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET,URL,null,new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
try {
VolleyLog.v("Response:%n %s", response.toString(4));
// parseJSON(response);
} catch (JSONException e) {
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
VolleyLog.e("Error: ", error.getMessage());
}
});
mRequestQueue.add(req);