Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

parse anonymous class does not implement abstract method

I am trying to retrieve objects from Parse cloud storage in a button click event in my Main Activity, this is the simple code I copied from the parse.com site examples:

    ParseQuery<ParseObject> query = ParseQuery.getQuery("WtestObj2");
    query.countInBackground(new CountCallback() {

        public void done(int count, ParseException e) {
            if (e == null) {
                //
            } else {
                //
            }
        }
    });

when I build I get the following error, it seems like my "new CountCallback" is creating an anonymous calss which does not implement an abstract method, but I copied the code 100% from parse.com online docs here, what else could be wrong in my Android Studio project?

'anonymous com.mobilevision.wtrend.MainActivity$4' is not abstract and does not override abstract method done(int,ParseException) in CountCallback

like image 382
Davide Piras Avatar asked Nov 19 '14 01:11

Davide Piras


1 Answers

It would seem that you have (or possibly your IDE has) imported the wrong ParseException class. It should be com.parse.ParseException.

like image 119
Mike M. Avatar answered Oct 06 '22 22:10

Mike M.