Skip to content

Unresolved reference when compiling a compose multiplatform project #781

Open
@cezarvancea

Description

@cezarvancea

I'm using kotlin multiplatform 2.0.20 and moko versions as per build.gradle info below.

I also attached a screenshot. I only get a build error but Android Studio does not complain about anything.. can navigate to the correct generated strings file by control-clicking the resource and all that..
Build fails though. Currently, I'm stuck. How to proceed?

I've gathered some parts of the build.gradle.kts (project level) below:

..

plugins {
    alias(libs.plugins.mokoResources.plugin) // 0.24.3
}

kotlin {
    listOf(
//        iosX64(), // Simulators for MacOS
//        iosArm64(), // Real devices
        iosSimulatorArm64() // Simulators for MacOS with M chipset
    ).forEach {
        it.binaries.framework {
            baseName = "ComposeApp"
            isStatic = true
            export(libs.moko.resources) // 0.24.3
            export(libs.moko.graphics)  // 0.10.0
        }
    }
    
    sourceSets {
        commonMain.dependencies {
            api(libs.moko.resources)            // dev.icerock.moko:resources           0.24.3
            api(libs.moko.resources.compose)    // dev.icerock.moko:resources-compose   0.24.3
            api(libs.moko.graphics)             // dev.icerock.moko:graphics            0.10.0
        }
    }
}

multiplatformResources {
    resourcesPackage = "ro.xxxxxxxxxx.xxxxxxxx"
    resourcesClassName = "SharedRes"
}

..

Screenshot 2024-10-01 at 20 29 31

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-infoRequired more details about issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions