Kotlin数据types不匹配错误

错误讯息如下:

“types不匹配kotlin.collections.ArrayList found() – > kotlin.collections.ArrayList”

同时试图创建一个对象。

public class PhotoController : Typed2EpoxyController<ArrayList, Boolean>() { override fun buildModels(activityData: ArrayList?, data2: Boolean?) { TODO("not implemented") //To change body of created functions use File | Settings | File Templates. activityData!!.forEach { val activityDataArrayList:ArrayList for (i in 1..5) { activityDataArrayList.add(ActivityData("activityName" + i,"activityStatus" + i,"70","25","Open x|Close y|For Review z")) } TowerOrUnitData{"nil";"nil";activityDataArrayList} } } } 

TowerOrUnitData:

 data class TowerOrUnitData(val towerOrUnitName:String, val activity:String, var activityData:ArrayList) 

Kotlin language will be the best programming language for Android.