java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 错误

你的ArrayList 是一个没有值的对象(不是null),也就是里面什么对象也没有存(即:arrayList.size()==0)。
但是,你有取它下标为0值的操作。所以,数组越界了!!比如arrayList.get(0);

原文地址:https://www.cnblogs.com/dirgo/p/5060031.html