bmob获取图片文件出现问题
W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String
cn.bmob.v3.datatype.BmobFile.getFileUrl()' on a null object reference
at com.hzh.qxapp.activity.Recive$7.done(Recive.java:246)
at cn.bmob.v3.http.a.From.Code(PolicyQuery.java:323)
网上找了好多方法,试了都是报这个错误。
BmobQuery<Post> query=new BmobQuery<Post>(); //查询Bmob数据库中的信息
query.findObjects(new FindListener<Post>() {
@Override
public void done(List<Post> list, BmobException e) {
try {
for(int i=0;i<list.size();i++)
vpList.add(list.get(i)); //获取查询到的数据存入内存
Glide.with(Recive.this).load(vpList.get(0).getMobanFile().getFileUrl()).into(moban); //显示图片
}catch (Exception ex){
ex.printStackTrace();
}
}
});
我也不知道到底哪儿出了问题,求助!!