Java - 错误: "java.lang.ArrayIndexOutOfBoundsException: length=1; index=1"

来源:互联网 发布:百度地图js touchend 编辑:程序博客网 时间:2024/06/01 10:14

错误: "java.lang.ArrayIndexOutOfBoundsException: length=1; index=1"


本文地址: http://blog.csdn.net/caroline_wendy/article/details/24464947


Java中, 错误: "java.lang.ArrayIndexOutOfBoundsException: length=1; index=1" ; 

意思: 数组(Array)索引(Index)越界(OutOfBounds)异常(Exception),长度(length)为1, 索引(index)为1;

因为索引值(index)要小于长度值(length), 索引是从0开始;

根据位置信息, 判断错误位置:

at mzx.spike.earthquake.app.EarthquakeListFragment.refreshEarthquakes(EarthquakeListFragment.java:118)

表明: EarthquakeListFragment.java文件的第118行, 出现这个错误.




6 2