Use kotlin coroutines.

Installed last version of InteliJ Community Version. Created a project with coroutines example from jetbrains WEB site.


 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.

// This file was automatically generated from by Knit tool. Do not edit.

import kotlinx.coroutines.*

fun main() = runBlocking { // this: CoroutineScope
    launch { // launch a new coroutine and continue
        delay(1000L) // non-blocking delay for 1 second (default time unit is ms)
        println("World!") // print after delay
    println("Hello") // main coroutine continues while a previous one is delayed

When building I get:

"e: C:\Users\Stephan\IdeaProjects\Lab2\src\main\kotlin\Main.kt: (1, 8): Unresolved reference: kotlinx"

How can be fixed?

1 comment
Official comment
Dear customer,
Please be aware that the AppCode community forum was deprecated and closed for comments on March 31, 2020.
To see further details please follow this link:
Thank you for your understanding.

Please sign in to leave a comment.