https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
n

Nikolay Kasyanov

02/05/2020, 11:01 AM
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.
k

Kris Wong

02/05/2020, 1:20 PM
no, it's not
and I don't experience the same. maybe reimport your build files?
n

Nikolay Kasyanov

02/06/2020, 10:16 AM
already did 🤔
thanks for chiming in btw!
b

baxter

02/06/2020, 9:41 PM
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:
Copy code
implementation "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version"
                implementation "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlin_version"
n

Nikolay Kasyanov

02/07/2020, 7:52 AM
@baxter that was exactly it! Thanks a lot!
🎉 1
2 Views