Skip to content Skip to sidebar Skip to footer

Android Studio 3.4.1, Kotlin "unresolved Reference: Mutablelistof"

I am building an AAR with Kotlin in Android Studio 3.4.1, and I get the dreaded 'unresolved reference' error when I try to use mutableListOf. val myBuffer: mutableListOf

Solution 1:

You have made some typo error: use = and not ::

val myBuffer = mutableListOf<Byte>()

or specify type explicitly:

val myBuffer: MutableList<Byte> = mutableListOf<>()

Solution 2:

Unresolved reference of mutableListOf or MutableList please try to implement this dependency:

implementation 'androidx.core:core-ktx:$kotlin_version'

Post a Comment for "Android Studio 3.4.1, Kotlin "unresolved Reference: Mutablelistof""