Guilherme Delgado
06/08/2026, 7:52 AMFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':core-di:validateArchitecturesForEmbedAndSignAppleFrameworkForXcode' (registered in build file 'core-di/build.gradle.kts').
> Xcode Requested Architecture Not Configured in Gradle
Xcode Requested Architecture Not Configured in Gradle
Xcode requested target architectures that are not configured in your Gradle build: ios_x64.
The framework 'core-di' cannot be built for these target architectures.
* Try:
> Add the missing Kotlin/Native target(s) to your kotlin {} block in build.gradle.kts
> Or exclude unsupported architectures in your Xcode project's Build Settings by setting EXCLUDED_ARCHS
> Run with --scan to get full insights from a Build Scan (powered by Develocity).
I’ve already set EXCLUDED_ARCHS and also ONLY_ACTIVE_ARCH to true, but still can’t make it build.
The only workaround was adding the following to the build phases / build pre-action scripts:
cd "$SRCROOT/.."
export ARCHS=$(echo "$ARCHS" | sed 's/x86_64//g' | xargs)
./gradlew ...
I’ve other projects using Kotlin 2.4.0 working without this workaround. Any hint? Unfortunately I can’t share a reproducible.Raphael TEYSSANDIER
06/08/2026, 7:58 AMGuilherme Delgado
06/08/2026, 8:01 AMexport ARCHS=$(echo "$ARCHS" | sed 's/x86_64//g' | xargs). KMP should simply ignore x86_64 instead of throwing an error. I know those targets are being deprecated, but I’m only running into this issue now. Other projects targeting Kotlin 2.4.0 and arm64 haven’t had this problem. In those cases, just setting ONLY_ACTIVE_ARCH was enough. 🤔Raphael TEYSSANDIER
06/08/2026, 8:02 AMGuilherme Delgado
06/08/2026, 8:06 AMlistOf(iosArm64(), iosSimulatorArm64()).forEach { iosTarget -> ... }Raphael TEYSSANDIER
06/08/2026, 8:07 AMGuilherme Delgado
06/08/2026, 8:09 AMRaphael TEYSSANDIER
06/08/2026, 8:10 AMGuilherme Delgado
06/08/2026, 8:10 AMONLY_ACTIVE_ARCH and since we have M chips, no x86_64 should be requested by the Xcode I believe.Guilherme Delgado
06/08/2026, 8:11 AMRaphael TEYSSANDIER
06/08/2026, 8:12 AMArtem Olkov
06/08/2026, 12:04 PMGuilherme Delgado
06/08/2026, 12:17 PMArtem Olkov
06/08/2026, 12:19 PMbothYes, xcode's prebuild action actually ignores architectures selected in the project 🙂 I feel like you have already reported this here: https://youtrack.jetbrains.com/issue/KT-86142#focus=Comments-27-13729000.0-0 ?
Guilherme Delgado
06/08/2026, 12:21 PMArtem Olkov
06/08/2026, 12:21 PM