sto usando mcxiaoke/android-volley library.Im errore di compilazione ottenendo comeErrore Compililation durante l'utilizzo JsonObjectRequest
Error:(77, 37) error: reference to JsonObjectRequest is ambiguous, both constructor
JsonObjectRequest(int,String,String,Listener<JSONObject>,ErrorListener) in JsonObjectRequest and constructor
JsonObjectRequest(int,String,JSONObject,Listener<JSONObject>,ErrorListener) in JsonObjectRequest match
questo è il mio code.I non sanno che cosa è sbagliato. Qualsiasi aiuto apprezzato
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET,
getRequestUrl(10),
null,
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
});
si passa un valore nullo, passare una stringa o un JSONObject –
penso valore nullo viene accettato. – Harish
sì null è accettato ma il dosent sa sapere quale costruttore stai chiamando. cast il null alla stringa –