n

    Nikolay Kasyanov

    2 years ago
    Hey folks, is this expected that importing
    import kotlin.test.Test
    is highlighted red in the IDE when the test is located in the
    commontTest
    source set? Gradle build doesn’t fail, seems like an IDE issue.
    Kris Wong

    Kris Wong

    2 years ago
    no, it's not
    and I don't experience the same. maybe reimport your build files?
    n

    Nikolay Kasyanov

    2 years ago
    already did 🤔
    thanks for chiming in btw!
    baxter

    baxter

    2 years ago
    I had the same issue in the past, and it was because I was actually importing that class from a library that had itself imported it.
    I fixed it by importing that library directly:
    implementation "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version"
                    implementation "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlin_version"
    n

    Nikolay Kasyanov

    2 years ago
    @baxter that was exactly it! Thanks a lot!