<argument android:name="upcomingEvents" app:argType="com.x.Models.Event[]" />
但是当我想使用安全参数传递数据时,出现此错误据说类型不匹配。 必需:Array 找到:ArrayList如何将ArrayList<Event>转换为Array<(out) Event!>?反之亦然,如何将Array<(out) Event!>转换为ArrayList<Event>?
据说
类型不匹配。 必需:Array 找到:ArrayList
必需:Array
找到:ArrayList
如何将ArrayList<Event>转换为Array<(out) Event!>?
ArrayList<Event>
Array<(out) Event!>
反之亦然,如何将Array<(out) Event!>转换为ArrayList<Event>?
toTypedArray()
asList()