drakeet / MultiType

Flexible multiple types for Android RecyclerView.
Apache License 2.0
5.76k stars 751 forks source link

当列表数据是纯String时 会报错 #255

Closed verzqli closed 5 years ago

verzqli commented 5 years ago

What kind of issue is this?

当列表数据是纯String时 register(String.class,XXXX),会出现java.lang.Class java.lang.Object.getClass()错误 method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
at me.drakeet.multitype.MultiTypeAdapter.indexInTypesOf(MultiTypeAdapter.java:339)

drakeet commented 5 years ago

你给 adapter 传递的 items 中包含 null 导致了这个问题,这不是这个项目的问题。