Android 显示未存储在json数据中的数据的凌空库

Android 显示未存储在json数据中的数据的凌空库,android,eclipse,Android,Eclipse,我对截击库有问题。我不明白应用程序中的所有值是从哪里获得的,即使无法访问互联网,而且api本身也无法提供数据。我试图清除缓存,但没有任何效果。如有任何建议,将不胜感激。谢谢 private void makeJsonObjReq() { //Log.e("makeJsonobjReq method", "inside"); pinfo = new PostsInfo(); JsonObjectRequest jsonObjReq = new JsonObjectReque

我对截击库有问题。我不明白应用程序中的所有值是从哪里获得的,即使无法访问互联网,而且api本身也无法提供数据。我试图清除缓存,但没有任何效果。如有任何建议,将不胜感激。谢谢

private void makeJsonObjReq() {
    //Log.e("makeJsonobjReq method", "inside");
    pinfo = new PostsInfo();
    JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.GET,
            Const.URL_JSON_ARRAY, null,
            new Response.Listener<JSONObject>() {
                @Override
                public void onResponse(JSONObject response) {
                    JSONArray jArray;
                    Log.e(TAG +"", " rrr "+ response.toString());
                    try {
                        Log.e(TAG, "" + response.getInt("count") + " " + response.getInt("pages") + " " + response.getInt("page"));
                        for (int i = response.getInt("page"); i <= response.getInt("pages"); i++) {
                            jArray = response.getJSONArray("results");
                            for (int j = 0; j < response.getInt("count"); j++) {
                                try {

                                        a_fetch_data.open();
                                        JSONObject json =  jArray.getJSONObject(i);
                                        Log.e(TAG +" no of count in array", "i = "+ json.getString("id"));
                                        //jsonObjectValue(json);

                                    }
                                    catch (JSONException e) {
                                        e.printStackTrace();
                                    }
                                }
                            Log.e(TAG, "Array "+ " Completed ");
                            }
                        }
                         catch (JSONException e1) {
                        e1.printStackTrace();
                    }
                }
            }, new Response.ErrorListener() {

                @Override
                public void onErrorResponse(VolleyError error) {
                    VolleyLog.d(TAG, "Error: " + error.getMessage());
                }
            });

    /*Adding request to request queue*/
    ApplicationController.getInstance().addToRequestQueue(jsonObjReq,
            "jobj_req");

    ApplicationController.getInstance().getRequestQueue().getCache().remove("jobj_req");
}
api:


问题是,即使我没有连接到internet,也没有在此处实例化任何缓存工作,此方法仍会返回响应。

发布一些代码,以及您认为会发生什么与正在使用的api发生什么?给我们看看你的截击码,你想接收哪些数据?我已经编辑了这篇文章。