I just wanted to taste Kotlin coroutines. Unfortunately, I haven't been able to use the library kotlinx in IntelliJ. I have downloaded the library through Maven.
- Tried invalidating caches.
- Rebuilt project.
- Tried using it in a fresh project.
- Even
IntelliJis suggestingkotlinxin auto-completion. - Still it says unresolved reference
I have tried most of the solutions on the web. But nothing worked.
Here are the steps that I am exactly doing.
Made a new project.
kotlinx is underlined since the library has not been added.
In project structure > modules > dependencies > add > library > maven Searched for the kotlinx library.
Downloaded the library.
Applied the settings.
kotlinx library is now visible in the External Libraries section.
Even the auto-completion is now suggesting kotlinx.
Still, nothing changes. The result is the same.








I have found the answer in the
Kotlinslack channel. And to solve this particular issue addorg.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0instead oforg.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0.However, it is generally a good idea to learn a build system like
GradleorMavenand using those in the project. It makes life a lot easier.