noobEinstien
noobEinstien

Reputation: 3283

Not found import kotlinx.coroutines.flow.*

I am trying to learn Kotlin Flow. And when I try to add

import kotlinx.coroutines.flow.* it is not resolving.

Can you please look at my dependencies and help to solve the problem?

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.core:core-ktx:1.1.0'
ext.kotlin_version = '1.3.61'

Please help me to solve the issue.

Upvotes: 17

Views: 24117

Answers (2)

w1cked
w1cked

Reputation: 35

The answer from John Le did not work for me, however this worked. Inside your build.gradle.kts (under dependencies) add:

implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.5.2")

You can read more about it here

Upvotes: 1

Gioan Le
Gioan Le

Reputation: 1168

From the document. Try to add the below dependence in to the build.gradle file(in the app level):

dependencies {
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
} 

Upvotes: 38

Related Questions