Mina Makhtar
Mina Makhtar

Reputation: 537

Unable to compile " unresolved reference: coroutines "

I unable to compile my project, which i'm not sure why but i'm getting this error "unresolved reference: coroutines" / "unresolved reference: scope"

it was working before as i was on java8 but after mishandling on dependency, i endup deleting java8 and now i'm on java11. i cant seem to compile my project anymore.

ext.kotlin_version = '1.3.31'

sourceCompatibility = "1.7"
targetCompatibility = "1.7

Upvotes: 4

Views: 3001

Answers (1)

Justin Bee
Justin Bee

Reputation: 31

You need to add the following to the dependencies of your build.gradle module:app

api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutines"

do you have?

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

Upvotes: 2

Related Questions