There are two similar constructors for com.android.volley.toolbox.JsonObjectRequest which have 5 parameters:
1
public JsonObjectRequest(int method, String url, String requestBody, Listener<JSONObject> listener, ErrorListener errorListener)
2
public JsonObjectRequest(int method, String url, JSONObject jsonRequest, Listener<JSONObject> listener, ErrorListener errorListener) {
If you pass null for the third parameter, it is impossible to detect which constructor you want to use. null for requestBody or null for jsonRequest?
You should better use another constructor:
public JsonObjectRequest(int method, String url, Listener<JSONObject> listener, ErrorListener errorListener)
or at your version of volley it should be:
public JsonObjectRequest(int method, String url, Listener<JSONObject> listener)
Or you can try to set third paramter;
1
with empty string (such as "") to use first constructor.
2
with empty but an instance of JSONObject (such as new JSONObject()) to use second constructor.
Edit: I guess you are using an older version of volley. At 1.0.19 version ErrorListener's are added to the constructors. So the consturctors at my answer are later version of yours. But the idea is same.