Hey, in my common I have three targets: iOS, andro...
# multiplatform
n
Hey, in my common I have three targets: iOS, android, jvm(for backend). For some reason I’m getting multiple errors, related to
kotlin-stdlib
, however in my
commonMain
sourceSet I’ve added the dependency. Anyone with some help?
a
Hi! Can you share the buildscript?
n
a
Please try to add something like this to the common one:
Copy code
sourceSets["jvmMain"].dependencies {
        implementation(kotlin("stdlib"))
}
n
I’ve just tried, didn’t help 😞
a
Can you please check, on what task is this happening? Also, maybe source set names are clashing, please try to reproduce it with another project name.
k
Not sure but one of the problems I encountered before was the directory for Android. I had to explicitly set them in the android block to achieve
androidMain
Copy code
android {
    sourceSets {
        getByName("main") {
            manifest.srcFile("src/androidMain/AndroidManifest.xml")
            java.srcDirs("src/androidMain/kotlin")
            res.srcDirs("src/androidMain/res")
        }
    }
}

kotlin {
    ...
    android()
    ...
}
n
@Artyom Degtyarev [JB] on the
compileKotlinJvm
a
Try to provide all targets with with non-default names and specify all source sets explicitly. Also, I’d ask you to create a reproducer, if it is possible.
👍 1