This might seem like a duplicate, but it is not.
I am aware that this issue has been posted many times on different platforms (example 1; example 2; example 3, but this is a different case that I believe deserves its own thread.
Every new Kotlin Multiplatform Mobile project I create is immediately flagged with this warning:
Duplicate content roots detected
Path [/Users/username/Downloads/KotlinProject/composeApp/src/commonMain/resources] of module [KotlinProject.composeApp.commonMain] was removed from modules [KotlinProject.composeApp.main]
They are all dealing with a Test package and that’s basically where their problem lies, as for me I am using Kotlin Multiplatform Mobile and Test packages are not the problem here. I suspect the duplication to be due to the shared code between the Android and iOS platform. I’m pretty sure of that but not totally. Here is a brand new KMM project created from the KMP Wizard. I didn’t change anything, this way anyone could try to reproduce the same warning on their own machine if they want.
As for anyone wondering, I am using the latest version of macOS on an M1 chip. I am pretty sure this is irrelevant but we never know. The Android Studio version is also the latest.
Also, I tried all the solutions mentioned in the examples above and none of them works for me.
P.S: Is this warning even that much of a problem? Is it gonna cause me trouble in the long run?
Younes Alaoui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.