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

matt tighe

10/29/2019, 5:11 AM
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

Luca Nicoletti

10/29/2019, 8:38 AM
1. When do you get this error? 2. What do you mean by
import Compose into two separate existing projects
m

matt tighe

10/29/2019, 3:42 PM
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

Luca Nicoletti

10/29/2019, 3:43 PM
You’re not importing compose in the
gradle
file?
m

matt tighe

10/29/2019, 5:18 PM
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

Tash

10/30/2019, 6:04 AM
@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.
2 Views