@Override
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
VideoTask videoTask = new VideoTask(paccakModel, childPosition, video);
videoTask.execute();
ArrayList<VideoModelXml> test = videoTask.getVideoModelXmls();
test.get(0);
video.setVideoPath(test.get(0).getUrlVideo());
video.start();
return true;
}
我有一个arraylist,它的大小为1,但是当我到达索引0时,我得到= java.lang.IndexOutOfBoundsException:索引:0,大小:0 谁能告诉我,这是怎么回事?
答案 0 :(得分:0)
您的问题的原因是date id value ranking
01-01-2018 A 50 1
01-01-2018 A 20 2
01-01-2018 B 40 1
01-01-2018 C 40 1
02-01-2018 A 30 1
03-01-2018 C 40 1
03-01-2018 C 20 2
04-01-2018 B 40 1
04-01-2018 B 0 2
05-01-2018 B 70 1
不返回任何内容。它应该是空的。如果您想避免崩溃
videoTask.getVideoModelXmls()
这将避免您的崩溃。