运行时出现异常,请问异常怎么解决
sepArray: data的series大小1
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.chenlei.holter10, PID: 15301
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at org.achartengine.util.IndexXYMap.getXByIndex(IndexXYMap.java:76)
at org.achartengine.model.XYSeries.getAnnotationX(XYSeries.java:235)
at org.achartengine.chart.XYChart.draw(XYChart.java:298)
代码:
if (mDataset1.getSeries().length>0) {
XYSeries seriesAt = mDataset1.getSeries()[0];//mDataSet为数据设置器XYMultipleSeriesDataset
seriesAt.addAnnotation("NNNN", 10, tempdata.get(1));
chart1.postInvalidate();
break;
}