julian
07/14/2020, 8:01 PMval f: Flow<Int> = flow<Int> { emit(1) }.transform<Int, Int> { emit(it) }
When I compile, I get
Error:(6, 32) Kotlin: Unresolved reference: transform
Error:(10, 47) Kotlin: Unresolved reference: transform
Error:(10, 69) Kotlin: Unresolved reference: emit
Error:(10, 74) Kotlin: Unresolved reference: it
So I set up a new project with the same dependency on kotlinx-coroutines-core:1.3.7
. That works fine.
Also, oddly, all my other flow-related code that doesn't use transform
is fine.
Has anyone else encountered this before?Dico
07/14/2020, 11:10 PMjulian
07/14/2020, 11:25 PMimport kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.transform
@FlowPreview
@ExperimentalCoroutinesApi
fun main() {
val f4: Flow<Int> = flow<Int> { emit(1) }.transform<Int, Int> { emit(it) }
}
Mayank
07/15/2020, 6:17 AMjulian
07/15/2020, 9:33 PM.gradle/caches
.Mayank
07/16/2020, 7:11 AMjulian
07/17/2020, 8:29 PM