Search code examples
androidlistviewcalllog

error in my android call log app


I made an Android project out of this code here:Call history android studio

There were a few bugs I ironed out, like changing paddingbottom to paddingBottom and so on in the activity_main.xml, and now the only problem I'm having is with calldata. Everywhere it comes up in my project, it's in red, and when I put the mouse over it I get, 'cannot resolve symbol calldata'

The only error that's different is when I put the mouse over :

public class CustomAdapter extends ArrayAdapter<calldata>{

The error is:

'getItem(int)' in 'android.widget.ArrayAdapter' clashes with 'getItem(int)' in 'android.widget.Adapter'; attempting to use incompatible return type
'cannot resolve symbol calldata'

In all the other areas in the project where calldata is referenced, namely:

CustomAdapter.java :
private List <calldata> listdata=null;

public CustomAdapter(Activity context, List <calldata> calldata) {

and

MainActivity.java :
    private List <calldata>list = new ArrayList<calldata>();

I get the message:

'cannot resolve symbol calldata'

Could anybody tell me what I need to add to my code to fix this? Thanks.


Solution

  • From the link you shared the file name is CallData.java, use appropriate file/class name to avoid errors.

    enter image description here