You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our project fails to be synced (specifically the KMP module) after updating moko-resources to 0.24.3 from 0.23.0. As I've tested, the same happens when using any of the other 0.24.x versions. The build (Android and iOS) is working fine, however android studio fails to sync and thus indexing is not working correctly. What is strange is that if XCode runs the copyResourcesKMMSharedDomainDebugXCFrameworkToApp task, it completes successfully and resources are indeed copied to the iOS application.
The following issue is displayed when trying to sync:
Unable to build Kotlin project configuration
Failed building KotlinMPPGradleModel
org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':shared:copyResourcesKMMSharedDomainXCFrameworkToApp'.
...
Caused by: java.lang.ClassCastException: class org.gradle.api.DefaultTask_Decorated cannot be cast to class org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFrameworkTask (org.gradle.api.DefaultTask_Decorated is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @277c0f21; org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFrameworkTask is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @5fb60b55)
The name KMMSharedDomain comes from using configureCopyXCFrameworkResources("KMMSharedDomain") in the configuration.
I've experimented a bit and found out that when I don't use configureCopyXCFrameworkResources in the configuration, the sync actually completes just fine -> obvious since the task does not get registered 😄
Our project fails to be synced (specifically the KMP module) after updating moko-resources to 0.24.3 from 0.23.0. As I've tested, the same happens when using any of the other 0.24.x versions. The build (Android and iOS) is working fine, however android studio fails to sync and thus indexing is not working correctly. What is strange is that if XCode runs the
copyResourcesKMMSharedDomainDebugXCFrameworkToApp
task, it completes successfully and resources are indeed copied to the iOS application.The following issue is displayed when trying to sync:
The name
KMMSharedDomain
comes from usingconfigureCopyXCFrameworkResources("KMMSharedDomain")
in the configuration.I've experimented a bit and found out that when I don't use
configureCopyXCFrameworkResources
in the configuration, the sync actually completes just fine -> obvious since the task does not get registered 😄I suspect the cast in SetupAppleUtils:registerCopyXCFrameworkResourcesToAppTask is the cause of the issue.
This is a screenshot from the debugger evaluating
this.project.tasks.getByName("assemble$xcFrameworkName")
right before the sync crashes.Thanks in advance.
The text was updated successfully, but these errors were encountered: