0

我一直在关注本教程,但在下面标记的行中出现标题错误。任何帮助将不胜感激!

public class ExpenditureArrayAdapter {

    private final Context context;
    private final Expenditure[] values;

    public ExpenditureArrayAdapter(Context context,Expenditure[] values) {
        super(context, R.layout.list_expenditures, values); <----
        this.context = context;
        this.values = values;
    }
}
4

1 回答 1

1

看起来你忘了延长ArrayAdapter。目前您的ExpenditureArrayAdapter类继承自Object,它没有构造函数Object(Context, int, T[])

改变

public class ExpenditureArrayAdapter {

public class ExpenditureArrayAdapter extends ArrayAdapter {

它应该可以解决您的问题。

于 2013-09-17T21:27:47.880 回答