このコードでは何も問題はありません。私は、エラーが発生しても、私はparamsに保存したAPIで2つのパラメータを使用していました。新しいJSONObject(のparams)** APIは完全に機能していますが、
onErrorResponse:エラー:Android - Volleyを使用してカスタムリストビューを表示するエラー
HashMap<String, String> params = new HashMap<String, String>();
params.put("employeeId", "dd25ec65-e276-488b-92b1-a324a1d4cc18");
private void getData(){
//Showing a progress dialog
final ProgressDialog loading = ProgressDialog.show(this,"Loading Data", "Please wait...",false,false);
//Creating a json obj request
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Config.DATA_URL,new JSONObject(params),
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
VolleyLog.v("Response:%n %s",response.toString());
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
VolleyLog.e("Error: ", error.getMessage());
}
});
//Creating request queue
RequestQueue requestQueue = Volley.newRequestQueue(this);
//Adding request to the queue
requestQueue.add(jsonObjectRequest);
}
エラーは何ですか? – earthw0rmjim
ログにのみエラーがあります。 – Abhi
[] url:0x8ede18 NORMAL null – Abhi