Hello Kotlin Community, I’m encountering an issue...
# android
s
Hello Kotlin Community, I’m encountering an issue in my Kotlin Multiplatform project related to the configuration of the Kotlin Native framework for an iOS target. When I try to build my project, I get the following error:
Could not create task ':shared:linkSharedReleaseFrameworkIos'.
> Could not create task of type 'KotlinNativeLink'.
> Configuration with name 'iosSharedReleaseFrameworkExport' not found.
This error suggests a problem with the task instantiation, specifically with the
KotlinNativeLink
type, and it points to a missing configuration named
iosSharedReleaseFrameworkExport
. Here is the relevant part of my
build.gradle.kts
file for reference (excluding any project-specific names): kotlin
kotlin {
iosArm64("ios") {
binaries {
framework("SharedFramework", listOf(NativeBuildType.RELEASE)) {
freeCompilerArgs += "-Xobjc-generics"
freeCompilerArgs += "-Xg0"
}
}
}
// Other configurations...
}
I have checked the framework configuration, ensuring the name and setup align with the Kotlin Multiplatform project standards. I’m currently using Kotlin version 1.8.21, and my const val
androidGradlePlugin = "com.android.tools.build:gradle:7.4.2"
distributionUrl=https\:<//services.gradle.org/distributions/gradle-7.5-all.zip>
Could someone help me understand what might be causing this issue and how to resolve it? Are there specific considerations I need to be aware of for Kotlin Native linking in this context? Any insights or suggestions would be greatly appreciated! Thank you in advance!
Any suggestions?
t
I don’t know what the issue is, but I can only suggest to update your dependencies. KMP went stable in one of the latest release. You can try to updated • Kotlin • AGP • Gradle Maybe that helps you resolving the issue 🤞
s
@Thomas Richtsfeld I tried all the possible versions for this, can you kindly provide the versions for each of them if possible.
t
I don’t know them by heart. I think if you Google them it would be easy Kotlin 1.9.21 AGP 8.1.4 Gradle 8.5