I’ve run into this issue while trying to import Co...
# compose
m
I’ve run into this issue while trying to import Compose into two separate existing projects. It’s not immediately apparent what is causing the issue when I look at file it’s complaining about. Does anyone have suggestions on how to debug this?
l
1. When do you get this error? 2. What do you mean by
import Compose into two separate existing projects
m
Don't we need compose in the app module to display composable widgets though? I.E the compose module would need to have an activity, since my main app module still won't be able to use
setContent
or anything?
l
You’re not importing compose in the
gradle
file?
m
I get the error any time I try to build the project. And by importing it to two projects, I mean following the steps here: https://developer.android.com/jetpack/compose/setup#add-compose
t
@matt tighe Ran into the same issue. Worked around it as per the recommendations by putting the Activity + Composable widgets in a separate android lib module with compose artifacts &
buildFeatures { compose = true}
. The
app
module ended up only containing DI logistics/other top level stuff and no Compose.