0

I am new to Kotlin and intellij and am trying to test out coroutines. I have an issue where my project is not allowing me to import coroutines. I feel like the solution isn't that tough, but just haven't be able to do it myself. I have followed the instructions detailed in this question, but without any success. I have included links to images of how my project and its dependencies are setup here Kotlinx.coroutines not importing

Coroutines not importing

Dependencies tab

Dependencies tab

If anyone has an idea of what I am doing wrong, please let me know. Going forward what should I be doing?

dbo123
  • 113
  • 2
  • 7
  • 1
    Try to depend on `kotlinx-coroutines-core-jvm` artifact, not on `kotlinx-coroutines-core` – Alexey Belkov Dec 24 '21 at 09:55
  • I've also tried adding `jetbrains.kotlinx.coroutines.core.jvm` to the dependencies as well, but this does not yield results. Let me know if I should provide any more information that'd you'd think would be helpful – dbo123 Dec 24 '21 at 16:05
  • Ok... I tried to do what you said again and realized that I forgot a wildcard. Thus, I imported the jvm version and wrote `import kotlinx.coroutines.*` and it doesn't give me an error anymore. Thanks! – dbo123 Dec 24 '21 at 17:45

0 Answers0