VolleyPlus
VolleyPlus copied to clipboard
anonymous class derived from ErrorListener must either be declared abstract or implement abstract method onErrorResponse(VolleyError error) in ErrorListener
JSONObject jsonParams = new JSONObject(params);
final JsonObjectRequest jsObjRequest = new JsonObjectRequest(context, Request.Method.POST, SERVER_URL, jsonParams, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
Log.d("deletePost", "response: " + response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.e("deletePost", "error: " + error);
}
});
VolleySingleton.getInstance(context).addToRequestQueue(jsObjRequest);
This is the error I'm getting from Androdi Studio, I can compile and run it without a problem: anonymous class derived from ErrorListener must either be declared abstract or implement abstract method onErrorResponse(VolleyError error) in ErrorListener
Do you have another module bringing in a Volley dependency by any chance?
Hi .. I'm having the same issue and yea I have another dependency for Volley. In my build.gradle I got :
compile 'com.android.volley:volley:1.0.0' compile 'dev.dworks.libs:volleyplus:+'
The fact is I can't use only the first one since I need the SimpleMultiPartRequest class for uploading a video file. At the same time I can't use only the second one since I 'm using the basic Volley JsonObjectRequest for basic http requests when logging the user ...
Any clue on how to workout this issue ??
@Saatch me too getting this issue. any workaround ?
@Saatch just remove
compile 'com.android.volley:volley:1.0.0'
from your dependence and sync again.
It seems VolleyPlus has all the functionality on Volley:1.0.0 library (as name suggests)
This should be mentioned in Docs/Read.me file
@qadir227 Yea I figured that out recently... I tried to use Volleyplus only for multipart video uploading requests but then I changed all my other normal volley requests to Volleyplus since they re conflicting each other and removed the dependency ... it solved the problem