java.lang.UnsupportedOperationException解决方法
开始的代码:
item.setAnswerpics(Arrays.asList(pointscheckentryList.get(i).getProblems_pics().split(",")))
正确的代码:
List<String> picsList = Arrays.asList(pointscheckentryList.get(i).getProblems_pics().split(",")); item.setAnswerpics(new ArrayList(picsList));
-- 多加了一个new ArrayList,这样就可以执行remove操作,否则会报java.lang.UnsupportedOperationException
参考:https://blog.csdn.net/qq_39416311/article/details/83688591
道法自然