BaseRecyclerViewAdapterHelper icon indicating copy to clipboard operation
BaseRecyclerViewAdapterHelper copied to clipboard

错误: DragAndSwipeAdapter不是抽象的, 并且未覆盖DraggableModule中的抽象方法addDraggableModule?

Open Lotusluo opened this issue 3 years ago • 2 comments

下载了最新的master,运行demo,但是运行报错? 错误: DragAndSwipeAdapter不是抽象的, 并且未覆盖DraggableModule中的抽象方法addDraggableModule

Lotusluo avatar Nov 18 '21 03:11 Lotusluo

自己实现空方法。如果报No virtual method getBindingAdapterPosition(),升级一下RecyclerView版本。

Akatsukishen avatar Nov 18 '21 08:11 Akatsukishen

因为DraggableModule的addDraggableModule是默认方法,在Kotlin中用没问题,但Android的Java还不支持这一特性。

如果只是想让Demo成功运行,可参考另一个Issue里的方法:https://github.com/CymChad/BaseRecyclerViewAdapterHelper/issues/3557#issuecomment-980491284


Kotlin中的默认方法在Java中的兼容问题是已知问题,并且已有解决方案,需要在编译库时加个参数,详见官方讨论KT1449

Orienser avatar Apr 28 '22 09:04 Orienser