W / System.err:.MainActivity $ 1.onResponse

时间:2018-03-12 18:45:40

标签: android

我正在尝试解析Json,它会显示错误

final StringRequest request = new StringRequest(Request.Method.GET, URL_DATA, new Response.Listener<String>() {
            @Override
            public void onResponse(String response) {
               // Log.d(TAG, response);
                try {

                    JSONObject jobj = new JSONObject(response);
                    Log.d(TAG, jobj.toString());
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {

            }
        });
        RequestQueue reQueue = Volley.newRequestQueue(this);
        reQueue.add(request);
    }

这是我的api http://159.65.89.76/userApi/categories

0 个答案:

没有答案