fragment中listview绑定数据库数据,提示java.lang.nullpointerexception 怎么解决

2025-05-17 09:39:55
推荐回答(3个)
回答1:

View view = inflater.inflate(R.layout.fragment_record, null);
这句话应该是View view = inflater.inflate(R.layout.fragment_record, container,false);

回答2:

哪儿提示的nullpointerexception 说明白点
你可以先用DEBUG 测一下 哪儿空不就找出来了吗?
不懂追问

回答3:

贴log看下就知道了.