出现err的代码
for (int i = 0; i < list.size(); i++) {
try {
JSONObject json = list.get(i).getJSONObject("postId");
String id = json.getString("postId");
AVQuery data = new AVQuery("Story");
data.whereEqualTo("objectId", id);
data.findInBackground(new FindCallback() {
@Override
public void done(List list, AVException e) {
if (e == null) {
if (list.size() > 0) {
AVLikeList.add(list.get(list.size() - 1));
Log.e("com.bug", "AVLikeList size:" + AVLikeList.size());
if (AVLikeList.size() == size && AVLikeList != null) {
Log.e("com.bug", "刷新");
isGet = true;
((MainActivity)getActivity()).refresh();
}
}
} else {
Log.e("com.bug", e.toString());
}
}
});
}catch (JSONException e){
Log.e("JSONException",e.toString());
}
}

找到原因:问题出现在((MainActivity)getActivity()).refresh();上 不过表示不理解 这个是Activity内的方法 与数据获取无关 为什么这里也会报错 - -