https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
s

Sean Proctor

08/04/2022, 4:23 PM
I have a KMP project that I'm trying to move from compose 1.1.1 to 1.2.0-alpha01-dev753. It builds just fine, but IntelliJ displays an error for every compose class/function/annotation. Does anyone know how to fix that?
I tried the obvious stuff, like invalidating the cache. It happens on two different systems even on a fresh import. I have the same issue in Android Studio.
m

Mitchell Syer

08/04/2022, 4:26 PM
Most of it is fixed in the Android Gradle plugin beta, but IntelliJ doesnt support it so you have to use the beta version of Android Studio. There are still some errors with libraries like Kamel and Voyager though, but its mostly usable.
l

Landry Norris

08/04/2022, 4:26 PM
I have seen the same for the past few days
@Mitchell Syer Which version is that? I’m currently using 7.2.2 on Electric Eel I installed yesterday, and I still see errors for all androidx.compose imports.
m

Mitchell Syer

08/04/2022, 4:28 PM
Copy code
7.3.0-beta05
s

Sean Proctor

08/04/2022, 4:30 PM
Thanks! I'll try that out.
Well, now that seems to have broken moko resources.
Maybe I'm better off waiting for the final release.
m

Mitchell Syer

08/04/2022, 4:56 PM
Heres a fix for the Moko-resources thing
Copy code
android {
    sourceSets.getByName("main") {
        assets.srcDir(File(buildDir, "generated/moko/androidMain/assets"))
        res.srcDir(File(buildDir, "generated/moko/androidMain/res"))
    }
}
Had the same issue
l

Landry Norris

08/04/2022, 6:41 PM
Updating the gradle plugin worked for me. Hopefully the next EAP has support for gradle 7.3.0 so I can go back to IDEA.
d

darkmoon_uk

08/05/2022, 3:42 AM
Yeah I am also hard-pinned to Electric Eel after resolving to use
1.2.0-alpha-01
.
I guess stability in the new year give us something to look forward to! 😅
s

Sean Proctor

08/08/2022, 9:25 PM
Why Electric Eel over Dolphin? Dolphin seems to be working okay. I wondering if there's something I'm missing.
l

Landry Norris

08/08/2022, 9:25 PM
I use electric eel for composition counts, but dolphin should be fine.
s

Sean Proctor

08/08/2022, 9:25 PM
BTW, the moko fixed worked great, thank you!
5 Views