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

gumil

03/04/2020, 10:42 PM
I'm getting NoSuchMethodError setContent on
0.1.0-dev06
Is this a known error? I also get
e: java.lang.IllegalStateException: Backend Internal error: Exception during code generation
when adding Text Style
l

Leland Richardson [G]

03/04/2020, 10:57 PM
going to guess that this means the compose compiler is not being used on that module
what is the full exception?
whenever I use this code
Copy code
Text(
                    text = "hello world",
                    modifier = LayoutPadding(8.dp),
                    style = MaterialTheme.typography().h2
                )
specifically when adding the style
I'm not sure what is causing this because I was previously using dev03 with the unaryPlus but in dev05 it's already deprecated.
l

Leland Richardson [G]

03/04/2020, 11:02 PM
this is unrelated to the unary plus
your build.gradle should have something like this:
Copy code
composeOptions {
        kotlinCompilerExtensionVersion = "0.1.0-dev06"
    }

    buildFeatures {
        compose = true
    }
does it?
g

gumil

03/04/2020, 11:05 PM
oh thanks for the help! it worked! is this documented somewhere? I don't find it in the release notes
l
easy to miss as most of the release notes are on the other package’s page
i’ll maybe suggest to someone that we add that on both
g

gumil

03/04/2020, 11:18 PM
thanks! i totally missed it.
m

Mariano Zorrilla

03/10/2020, 11:49 PM
Thanks @Leland Richardson [G] that worked fot me
4 Views