Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved reference when compiling a compose multiplatform project #781

Open
cezarvancea opened this issue Oct 1, 2024 · 1 comment
Open

Comments

@cezarvancea
Copy link

cezarvancea commented Oct 1, 2024

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
@cezarvancea
Copy link
Author

Probably linked to #744

@cezarvancea cezarvancea changed the title Unresolved reference when compiling using Kotlin multiplatform 20.0.20 and moko versions as per build.gradle below. Unresolved reference when compiling using Kotlin multiplatform 2.0.20 and moko versions as per build.gradle below. Oct 1, 2024
@cezarvancea cezarvancea changed the title Unresolved reference when compiling using Kotlin multiplatform 2.0.20 and moko versions as per build.gradle below. Unresolved reference when compiling a compose multiplatform project Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant