I'm trying to build an ios project in Xcode that u...
# multiplatform
b
I'm trying to build an ios project in Xcode that uses KMP, it uses a Build Phase script that runs:
Copy code
cd "$SRCROOT/.."
./gradlew :shared:embedAndSignAppleFrameworkForXcode
This has been working fine. Then today, my build started failing with:
Copy code
e: java.lang.NoClassDefFoundError: org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo (initialization failure)
I'm not sure what this means, or how to fix it? Has anyone else run into this?
m
From my experience, it can be one of two three things: • Gradle Cache issue: run
./gradlew clean
and try again running
./gradlew :shared:embedAndSignAppleFrameworkForXcode
Check Kotlin Version Compatibility: Verify that the Kotlin version used in your shared module's
build.gradle.kts
(or
build.gradle
) file is compatible with the Kotlin Gradle plugin version. • Xcode Version: When developing KMP project with support to any iOS target, always make sure that your Xcode version is compatible with KMP which can be found here https://kotlinlang.org/docs/multiplatform-compatibility-guide.html#version-compatibility
b
I've eliminated some variables ... I can't even do a
gradlew clean
in the Multiplatform project folder. I get the same error. So it's not an Xcode thing. I've double checked my kotling and plugin versions. those are good. I'm not sure what's going on here
@Moussa Thanks for the tips. I have a fourth item to add to your list of possible things: • Reboot your mac 🤦‍♂️ I rebooted, and my builds work great.
🤦‍♂️ 1
m
Oh my god 🤦‍♂️ 😅