Hello! I’am trying to use AppCode to edit kotlin and swift. The Gradle sync compete successful but i don’t get reference resolve between kotlin and swift.
The possible wreaking places can be message in gradle log:
Copy code
Top-level Android dependencies are not supported – please declare the dependencies for an individual source set.
And message from AppCode (doesn’t shows in gradle log)
Copy code
Collection contains no element matching the predicate.
AppCode 2022.2
Build #OC-222.3345.144, built on August 2, 2022
com.jetbrains.appcode.android (222.3345.144)
com.intellij.appcode.kmm (222.3345.144)
j
Joey
10/14/2022, 2:12 PM
Did you manage to solve this? I'm currently facing the same problem
s
Slava Kornienko
10/14/2022, 2:13 PM
Don’t resolved. AppCode better works with only Kotlin plugin. Not with AppCode Kotlin Multliplatform plugin
j
Joey
10/14/2022, 2:20 PM
I see, thanks for the quick answer. I guess I'll try to see if the EAP version fixes anything, else I'll just keep using xCode.
Joey
10/14/2022, 2:30 PM
(just a small update, still broken in EAP)
s
Stefan Thaler
11/07/2022, 12:23 PM
What helped me is moving the dependencies into
kotlin / sourceSets
block and use the KMP plugin instead of the android plugin.
Copy code
// androidApp/build.gradle.kts
plugins {
kotlin("multiplatform") // instead of kotlin("android")
id("com.android.application")
//...
}
kotlin {
android()
sourceSets {
val androidMain by getting {
dependencies {
implementation(project(":shared"))
// other app dependencies
}
}
}
}
android {
// android configuration
}