Skip to content Skip to sidebar Skip to footer

Object() In Object Cannot Be Applied While Creating Adapter Image

I am creating an adapter image and I am having this 2 errors: this is the code public class GridViewAdapter { private Context mcontext; private int layoutResourceId;

Solution 1:

super try to invoke the super class. You are extending nothing, so implicitly, you are inheriting from Object which, in turn, has no such constructor (a constructor that takes three parameters)

Change

publicclassGridViewAdapter {

with

publicclassGridViewAdapterextendsArrayAdapter<ListItem> {

Solution 2:

As we know super in java is calling the extended class constructor and in your case it has no extended class. Always remember that if no class is extended super calls the no arg constructor of Object class and object class has no constructor with three parameters.

Post a Comment for "Object() In Object Cannot Be Applied While Creating Adapter Image"