Reputation: 1669
I'm new to Jetpack Compose. I follow tutorial from docs. But unfortunately, I can't use following code.
Button(onClick = {
}) {
Text(text = "Hello")
}
error is
@Composable invocations can only happen from the context of a @Composable function
.
I tried every possible ways to fix that error. Thanks for your time.
I've already tried every code snippets from docs but nothing is working.
Upvotes: 0
Views: 71
Reputation: 1669
I found the solution. Simply disable the K2 Kotlin mode in the settings.
Upvotes: 0