Hey all, I've been really struggling to get Compos...
# compose
r
Hey all, I've been really struggling to get Compose to work with an existing Android project. I keep getting an error during compilation, and my googling of it hasn't been very helpful. I'm hoping someone here might have an idea of what's going on. Error message and more details in the thread...
it seems like a weird build issue
i'm using Android Studio Arctic Fox Beta 4
the error message complains about a class that does have proper annotations...
Copy code
@Serializable
data class BaseResponse<T>(val code: Int, val response: T? = null)
z
what versions of kotlin, kotlinx-serialization, agp, compose are you using?
r
kotlin = 1.4.32 serialization = 1.0.0 compose = 1.0.0-beta07 agp = 7.1.0-alpha02
z
Did you change kotlin version recently and have a stale daemon maybe? Just guessing, I have no idea
r
i thought that, and weirdly, it will sometimes compile and sometimes not
i wonder if it's a bug somewhere during compilation. maybe race conditions or something?
cus running this on my CI/CD produces the same result, but every single time it fails
z
What if you try disabling parallelism when you run it locally (there’s a flag, I forget what it is)
r
i spent some time testing this out, and it turns out that my particular combination of dependencies are causing this issue. specifically it's an issue with kotlin serialization and compose not liking each other
other things like using
Result<T>
causes issues with Kotlin 1.5, so I have to wait until Kotlin 1.5.30 to use Compose in my project
thanks for your help determining this @Zach Klippenstein (he/him) [MOD]