Why is androidMain different and how to fix this? ...
# multiplatform
a
Why is androidMain different and how to fix this? I'm using the latest stable Android Studio and kotlin 1.6.21. I have a problem that I thought might be related to this. There's an actual class inside androidMain that doesn't recognize a dependency that its expect class inside commonMain also implements with no problems.
l
Since Android uses Kotlin for native development, KMM for Android wraps the Android plugin. The android plugin recognizes that androidMain is an Android source set, so it uses the same icon and name it would use if this were a normal Android project.
I’ve noticed that Android Studio has some issues with expect/actuals, so I mainly use IntelliJ IDEA.
n
Sometimes I run into the same bug. For me only removing an readding the Gradle project solves the issue ("Unlink Gradle project" then "Link Gradle project" in the Gradle tool window).