java.lang.NoSuchMethodError: No interface method sort(Ljava/util/Comparator;)排序数组列表中的异常
我试图在Android应用程序中的Java中排序,但我得到了这个奇怪的例外。ArrayList
法典:
eventsList.sort(new Comparator<Event>() {
@Override
public int compare(Event event, Event t1) {
return event.getEventStartDate().compareTo(t1.getEventStartDate());
}
});
例外:
java.lang.NoSuchMethodError: No interface method sort(Ljava/util/Comparator;)V in class Ljava/util/List; or its super classes (declaration of 'java.util.List' appears in /system/framework/core-libart.jar)