Ezekiel Adetoro
09/15/2025, 9:11 AMerror: Cannot query the value of this provider because it has no value available. * What went wrong:
Execution failed for task ':composeApp:syncComposeResourcesForIos'.
> Cannot query the value of this provider because it has no value available. And in XCode, I have this error: /KMP/iosApp/iosApp/ContentView.swift:3:8 No such module 'ComposeApp' . I have tried to apply many solution i foound online which does not work. I tried to use ./gradlew composeApp:syncComposeResourcesForIos I got: > Task :composeApp:syncComposeResourcesForIos FAILED. * What went wrong:
Execution failed for task ':composeApp:syncComposeResourcesForIos'.
> Error while evaluating property 'xcodeTargetArchs' of task ':composeApp:syncComposeResourcesForIos'.
> Could not infer iOS target architectures. Make sure to build via XCode (directly or via Kotlin Multiplatform Mobile plugin for Android Studio) . What am I doing wrong? How can I solve this issue?Jacob Ras
09/22/2025, 6:13 PMCiaran Sloan
09/22/2025, 7:15 PMbaseName of the iOS binary (in the shared module build.gradle file) and perhaps not make the same change in the iOS project? (Namely the ContentView.swift file where the import is declarednguyenanhtrung
09/26/2025, 10:17 AMEzekiel Adetoro
10/13/2025, 8:28 PMEzekiel Adetoro
10/13/2025, 8:30 PMimport org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidApplication)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}
kotlin {
androidTarget {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}
listOf(
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "ComposeApp"
isStatic = true
}
}
sourceSets {
androidMain.dependencies {
implementation(compose.preview)
implementation(libs.androidx.activity.compose)
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
implementation(libs.androidx.lifecycle.viewmodelCompose)
implementation(libs.androidx.lifecycle.runtimeCompose)
}
commonTest.dependencies {
implementation(libs.kotlin.test)
}
}
}
android {
namespace = "com.ezadetoro.myapplication"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
applicationId = "com.ezadetoro.myapplication"
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
dependencies {
debugImplementation(compose.uiTooling)
}Ezekiel Adetoro
10/13/2025, 8:30 PMEzekiel Adetoro
10/13/2025, 8:34 PMEzekiel Adetoro
10/14/2025, 8:46 AMCiaran Sloan
10/14/2025, 8:47 AMEzekiel Adetoro
10/14/2025, 8:54 AMTanish Azad
10/14/2025, 12:04 PM