I try to compile https://github.com/CuriousNikhil/k5-compose in IntelliJ (Apple-Silicon) on an M1 MacbookPro, I got the below error
Caused by: org.jetbrains.skiko.LibraryLoadException: Cannot find libskiko-macos-arm64.dylib.sha256, proper native dependency missing.
at org.jetbrains.skiko.Library.load(Library.kt:71)
at org.jetbrains.skiko.HardwareLayer.<clinit>(HardwareLayer.kt:10)
How can I solve this issue?
In the build.gradle.kts of the project, change implementation(compose.desktop.currentOs) to implementation(compose.desktop.macos_arm64)
While I found the accepted answer to work:
Changing
implementation(compose.desktop.currentOs)to
implementation(compose.desktop.macos_arm64)
The documentation seems to indicate that you should just update the version of the wizard:
The Compose plugin version used in the wizard above might not be the latest. Update to the latest plugin version by editing the
build.gradle.ktsfile and updating the version information as shown below. For the latest versions, see the latest versions site and the Kotlin site.
plugins {
kotlin("jvm") version "1.7.20"
id("org.jetbrains.compose") version "1.2.2"
}
Which also works, and I think should be preferred.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With