JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.93k stars 1.16k forks source link

Expected object 'MR' has no actual declaration in module MyApplication.shared.iosArm64Main for Native #3603

Open wangzhigang1112 opened 1 year ago

wangzhigang1112 commented 1 year ago

Has anyone encountered the following problem: using a third-party library and encountering compilation errors?

ERROR INFO

m-sasha commented 1 year ago

Does this still occur with Compose 1.5.0?

Moozart commented 1 year ago

Same issue me too

wangzhigang1112 commented 1 year ago

Does this still occur with Compose 1.5.0?

image image

After changing the Compose version to 1.5.0, the problem still exists.

sunildhiman90 commented 1 year ago

I also have same issue for ios, and something similar for android as well:

Expected object 'MR' has no actual declaration in module <shared_debug> for JVM

and this one in web app:

java.lang.IllegalArgumentException: Cross module dependency resolution failed due to signature 'org.w3c.dom.events/EventListener|2833721539368120484[0]' redefinition
    at org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.JsIrModuleCrossModuleReferenceBuilder.buildCrossModuleRefs(JsIrProgramFragment.kt:168)
    at org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.CrossModuleDependenciesResolver.resolveCrossModuleDependencies(JsIrProgramFragment.kt:131)
    at org.jetbrains.kotlin.ir.backend.js.ic.JsExecutableProducer.buildMultiModuleExecutable(JsExecutableProducer.kt:56)
    at org.jetbrains.kotlin.ir.backend.js.ic.JsExecutableProducer.buildExecutable(JsExecutableProducer.kt:30)
    at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:309)
    at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:181)
    at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:72)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:100)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:46)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1497)

Able to access resources by id but while building , facing these issues after adding moko-resources.

m-sasha commented 1 year ago

Waiting for reply from the moko-resources team...

umesh0492 commented 11 months ago

Facing the same issue, any updates here?

paskcountry commented 11 months ago

Same issue to me. I have to migrate to Kotlin version 1.9.x to support compatibility with Xcode 15 and iOS 17. I'm not using compose for Android.

dima-avdeev-jb commented 10 months ago

Can you please provide a minimal reproducible sample?

okushnikov commented 3 weeks ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.