Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anonymous class derived from ErrorListener must either be declared abstract or implement abstract method onErrorResponse(VolleyError error) in ErrorListener #54

Open
adimitorv opened this issue Jul 15, 2016 · 5 comments

Comments

@adimitorv
Copy link

 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

@shaharyakir
Copy link

Do you have another module bringing in a Volley dependency by any chance?

@Saatch
Copy link

Saatch commented Apr 18, 2017

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 ??

@qadir227
Copy link

@Saatch me too getting this issue. any workaround ?

@qadir227
Copy link

@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

@Saatch
Copy link

Saatch commented Jun 11, 2017

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants