调试安卓BaseAdapter中的inflater的时候总是会跳出这个错误,我明明给inflater赋了值的

2025-06-28 15:39:55
推荐回答(1个)
回答1:

这样LayoutInflater inflater肯定为空,你这叫声明不叫初始化,
这样:LayoutInflater inflater= LayoutInflater.from(context);才行