尝试时出现运行时错误
val gson = GsonBuilder().create()
val user = gson.fromJson("{\"name\":\"Alex\"}", User::class.java)
用户在哪里
class User(val name: String) : Item<ViewHolder>() {
override fun bind(viewHolder: ViewHolder, position: Int) {
// code
}
override fun getLayout(): Int {
// code
}
}