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 coroutines-basics.md by Knit tool. Do not edit.
package kotlinx.coroutines.guide.exampleBasic01

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?

0
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: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360007631480-The-AppCode-Community-Forum-Is-Deprecated
Thank you for your understanding.
JetBrains

Please sign in to leave a comment.