Downloaded demo code for just IOS Share UI (android not checked) from KMP Wizard
I tried to move App.kt
and Greeting
under composeApp/src/iosMain/kotlin
as well as a refactored version of Platform.kt
so it included an interface and an expec getPlatformName
function to a newly created composeApp/src/commonMain/kotlin
. I also chaneged the original Platform.kt
to be an implementation of the interface and an actual getPlatformName
function.
The build process fails however after the changes.
The major error is
Execution failed for task ':composeApp:compileIosMainKotlinMetadata'.
> Compilation finished with errors
And two warnings
duplicate library name: library_commonMain
duplicate library name: runtime_commonMain
I looked at the dependencies and there don’t seem to be any ios platform-specific ones being used in commonMain
. What else could be causing the issue?
In addition, adding two additional plugins to the build.gradle.kts
file under composeApp
also causes the same error.
plugins {
...
alias(libs.plugins.kotlinxSerialization)
alias(libs.plugins.sqldelight)
}
Jojo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.