I have a KMP project that I'm trying to move from ...
# compose-desktop
s
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
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
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
Copy code
7.3.0-beta05
s
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
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
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
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
Why Electric Eel over Dolphin? Dolphin seems to be working okay. I wondering if there's something I'm missing.
l
I use electric eel for composition counts, but dolphin should be fine.
s
BTW, the moko fixed worked great, thank you!