question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IDE shows unresolved references for MPP Compose in androidMain source sets

See original GitHub issue

This happens for me for a couple of months already. All MPP Compose references are red (unresolved) in all androidMain source sets in all IDEs. Other KMP libraries work fine. Everything compiles just fine.

Kotlin 1.7.0, 1.7.10 Compose 1.2.0-alpha01-dev753, 1.2.0-beta01 Gradle 7.4.2, 7.5.1 AGP 7.2.2.

I have tried different IDEs:

  • AS Chipmunk 2021.2.1 Patch 2
  • AS Dolphin 2021.3.1 RC 1
  • AS Flamingo 2022.2.1 Canary 1
  • IDEA Ultimate 2022.2.1

I have also tried different OSs - Ubuntu and macOS.

I have attached a reproducer project - Reproducer.zip.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:6
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JavierSegoviaCordobacommented, Sep 29, 2022

If you apply the original androidx compose libraries to the Android source set (androidMain), the IDE issue is gone.

1reaction
mipastgtcommented, Sep 28, 2022

Just wanted to add the link to the related discussions on Slack: https://kotlinlang.slack.com/archives/C3PQML5NU/p1652224566469179

Read more comments on GitHub >

github_iconTop Results From Across the Web

MPP, IDE: Unresolved reference in Kotlin multiplatform multi ...
The following project structure, in which all projects are multiplatform Kotlin projects, results in unresolved references in IntelliJ IDEA 2019.1 (Community ...
Read more >
KMM + Compose: Unresolved reference: drawable
I have a KMM application in which the android ...
Read more >
Current issues with Kotlin Multiplatform and how to fix them
The project is created with a few source sets commonMain , commonTest , iosMain etc. ... 16): Unresolved reference: serialization.
Read more >
Kotlin multiplatform mobile Unresolved dependencies ...
Kotlin multiplatform mobile Unresolved dependencies/references ... kotlin { android() ios() sourceSets { val commonMain by getting ...
Read more >
Unresolved Reference: Platform, In Multiplatform Project
30 all external dependencies is unresolved in IDE with kotlin.mpp. ... name KT30116 IDE: Unresolved reference in MPP module androidMain source set for....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found