在请求对象里面添加下面一条语句:
protected Response<String> parseNetworkResponse(NetworkResponse response) { try { String jsonObject = new String( new String(response.data, "UTF-8")); return Response.success(jsonObject, HttpHeaderParser.parseCacheHeaders(response)); } catch (UnsupportedEncodingException e) { return Response.error(new ParseError(e)); } catch (Exception je) { return Response.error(new ParseError(je)); } }
时间: 2024-10-14 07:59:26