Hello, I am learning KMM, and I follow the tutoria...
# multiplatform
s
Hello, I am learning KMM, and I follow the tutorials on the website, I have a question , I already add dependency and sync.
Copy code
sourceSets {
    val commonMain by getting {
        dependencies {
            //put your multiplatform dependencies here
            implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
        }
    }
    val commonTest by getting {
        dependencies {
            implementation(kotlin("test"))
        }
    }
}
But I can’t import datetime, as shown in the figure. who can help me ,thanks!😂
👀 1
j
Did you manage to sort this out? If not: what happens if you just try to build? If that works, then this red import is a bug in IntelliJ instead of something being wrong with your config.
s
Hi, I tried a lot of builds, restarted Android Studio (Android Studio Giraffe | 2022.3.1 Patch 1), and couldn’t even uninstall and reinstall. However, I installed Preview Android Studio (Android Studio Hedgehog 2023.1.1 Beta 3) and it worked, so I think it was official Android Studio bug.😂
👍 1