Mateus Bauer
10/07/2025, 1:54 AMUncaught Kotlin exception: org.jetbrains.compose.resources.MissingResourceException
I am facing this issue whenever I build the release XcFramework and try to run it. I don't know what's happening, since I am using the following settings(and that shoudn't happen):
composeMultiplatform = "1.9.0"
kotlin = "2.2.20"
It was supposed to should work fine after CMP 1.8.2.
Also, I can confirm that the resources are present in both simulator and arm64 frameworks, inside the XcFramework. I am running out of options, already read all things related and checked everything.Mateus Bauer
10/07/2025, 12:23 PMcompose.resources {
publicResClass = true
packageOfResClass = "com.estudia.res"
generateResClass = auto
}
But nothing changed. Same error.iQQator
10/08/2025, 6:38 PM// My variant :)
val frameworkName = "Shared"
val xcf = XCFramework(frameworkName)
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = frameworkName
binaryOption("bundleId", "tld.app.${frameworkName}")
xcf.add(this)
isStatic = false
}
}
also:
<https://youtrack.jetbrains.com/projects/CMP/issues/CMP-8232/org.jetbrains.compose.resources.MissingResourceException-Missing-resource-with-path-composeResources>Mateus Bauer
10/08/2025, 6:51 PMMateus Bauer
10/08/2025, 6:52 PMiQQator
10/08/2025, 8:07 PMRes to appear in the project, however, I had to reset the caches, File > Invalidate Cache and rebuild framework by ./gradlew assembleAppSharedXCFramework and framework to SPM, and connect it to iOS appiQQator
10/08/2025, 8:48 PMcompose.resources {
publicResClass = true
generateResClass = always
}
This doesn't work at all :(iQQator
10/08/2025, 8:51 PMMateus Bauer
10/08/2025, 8:54 PMiQQator
10/08/2025, 9:08 PMcomposeResources work with XCFrameworkMateus Bauer
10/08/2025, 9:08 PMiQQator
10/08/2025, 9:10 PMiQQator
10/08/2025, 9:17 PMiQQator
10/08/2025, 9:18 PMtext = stringResource(Res.string.hello_message),
And it workiQQator
10/08/2025, 9:25 PMstatic, and resolve it by change it to dynamic
in gradle:
val frameworkName = "Shared"
val xcf = XCFramework(frameworkName)
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = frameworkName
binaryOption("bundleId", "tld.app.${frameworkName}")
xcf.add(this)
isStatic = false
}
}
in Package.swift
import PackageDescription
let package = Package(
name: "Shared",
platforms: [
.iOS(.v16),
],
products: [
.library(
name: "Shared",
targets: ["Shared"]),
],
targets: [
.binaryTarget(name: "Shared", path: "./Shared.xcframework")
]iQQator
10/08/2025, 9:33 PMMateus Bauer
10/08/2025, 9:48 PMMateus Bauer
10/09/2025, 3:02 AMMateus Bauer
10/09/2025, 3:03 AMiQQator
10/09/2025, 6:29 AMcomposeMultiplatform = "1.9.0"
kotlin = "2.2.20"
[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
[plugins]
composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" }
composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }iQQator
10/09/2025, 6:33 AMiQQator
10/09/2025, 6:34 AMMateus Bauer
10/10/2025, 12:34 PMMateus Bauer
10/10/2025, 12:40 PMMateus Bauer
10/10/2025, 12:42 PM