https://kotlinlang.org logo
#compose
Title
# compose
f

Frank van der Laan

06/09/2022, 9:09 AM
When a library starts to use jetpack compose for some of its UI components, do all apps using the library have to setup compose dependencies as well?
m

Mehdi Haghgoo

06/09/2022, 9:22 AM
No, I think the library has already fetched them!
f

Frank van der Laan

06/09/2022, 9:26 AM
Do you think or know, because I’m having problems with this.
"ClassNotFoundException: Didn't find class "androidx.compose.runtime.internal.LiveLiteralKt" is logged in the app. Even when it does not use the composables from the library.
m

Mehdi Haghgoo

06/09/2022, 9:47 AM
Sorry, my bad. Every module has its own gradle file. So, you should set up Compose in your app module as well.
f

Frank van der Laan

06/09/2022, 10:27 AM
I’m afraid so. FYI: the library is an external library, I’m not talking about modules
m

Mehdi Haghgoo

06/09/2022, 10:39 AM
Right. And even an external library can also be considered a module. It is "structurally the same as an Android app module".
f

Frank van der Laan

06/09/2022, 12:52 PM
Correct answer is: it is possible: a compose library with non-compose consumer apps. The error I had was related to the live-edit feature and I could disable it for the crashing legacy views with @NoLiveLiterals
2
m

Mehdi Haghgoo

06/09/2022, 12:57 PM
Great. Just curious, how do you use your Compose components inside the non-compose consumer app?
c

Chris Sinco [G]

06/09/2022, 4:54 PM
So is this a bug with Live Edit in an app with both Compose and Views?
160 Views