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
Landry Norris
06/02/2022, 6:48 PM
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.
Landry Norris
06/02/2022, 6:49 PM
I’ve noticed that Android Studio has some issues with expect/actuals, so I mainly use IntelliJ IDEA.
n
Norbi
06/02/2022, 7:35 PM
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).