报错详情如下:
E/AndroidRuntime: in writeCrashedAppName, pkgName :com.example.assetinventory
D/AndroidRuntime: file written successfully with content: com.example.assetinventory StringBuffer : ;com.example.assetinventory
E/AndroidRuntime: FATAL EXCEPTION: InsertAssetCheckRecord
Process: com.example.assetinventory, PID: 17069
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.get(ArrayList.java:411)
at com.example.assetinventory.manager.AssetinfoDaoManager.CheckedNeedUpdate(AssetinfoDaoManager.java:248)
at com.example.assetinventory.ksoap2.assetSoap$2.run(assetSoap.java:184)
上述信息中java.lang.IndexOutOfBoundsException: Index: 1, Size: 1为最重要部分,也就是说小子在for循环取list中实体时的索引值不对,通过单步测试后发现,其index只能为0(愚for循环中让index递增),每获取list中一个实体并update后,其就从list中将该实体remove了,导致后一个index本应为n+1,但其index仍为n,也就是说index从0开始的话,取第二实体时就会报错……目前还不清楚其原理为何……
后续需要继续关注,记之以备忘。