Caused by: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0

一般遇到这种问题就是数组越界了 打断点调试你的list数组

当你的list数组size为0时,但是你又去list.get()方法了,那么久一定会报错

所以最好的办法就是去判断一下你的数组是否拥有数据

猜你喜欢

转载自blog.csdn.net/dream_miracle/article/details/79805536