Adib Faramarzi
07/15/2021, 4:55 AMcomposeView.setContent {
Text(text = "WELCOME TO COMPOSE!")
}
and I get a runtime error
java.lang.NoSuchMethodError: No virtual method setContent(Lkotlin/jvm/functions/Function0;)V in class Landroidx/compose/ui/platform/ComposeView; or its super classes (declaration of 'androidx.compose.ui.platform.ComposeView' appears in /data/app/taxi.tap30.passenger.debug--kKKwSbfzrf377VbKRnzSQ==/base.apk)
Colton Idle
07/15/2021, 5:13 AMbuildSrc
?theapache64
07/15/2021, 5:14 AMLuis
07/15/2021, 5:14 AMandroidx.core:core-ktx
Luis
07/15/2021, 5:14 AMColton Idle
07/15/2021, 5:15 AMAdib Faramarzi
07/15/2021, 5:15 AMAdib Faramarzi
07/15/2021, 5:16 AMAdib Faramarzi
07/15/2021, 5:18 AMLuis
07/15/2021, 5:22 AMAdib Faramarzi
07/15/2021, 5:23 AMLuis
07/15/2021, 5:25 AMLuis
07/15/2021, 5:25 AMAdib Faramarzi
07/15/2021, 5:26 AMephemient
07/15/2021, 6:22 AMAlbert Chang
07/15/2021, 6:51 AM@Composable () -> Unit
should be Function2
instead of Function0
after transformation performed by the compiler plugin.
Are you enabling compose compiler plugin by specifying buildFeatures.compose = true
in your build script?Cicero
07/15/2021, 11:32 AMbrandonmcansh
07/15/2021, 11:53 AMAdib Faramarzi
07/15/2021, 12:07 PMbrandonmcansh
07/15/2021, 12:15 PMAdib Faramarzi
07/15/2021, 1:04 PMAdib Faramarzi
07/15/2021, 1:07 PMuseOldBackend true
)brandonmcansh
07/15/2021, 1:31 PMAdib Faramarzi
07/15/2021, 1:31 PMbrandonmcansh
07/15/2021, 1:32 PMAdib Faramarzi
07/15/2021, 1:32 PMbrandonmcansh
07/15/2021, 1:32 PMAdib Faramarzi
07/15/2021, 1:33 PMbrandonmcansh
07/15/2021, 1:33 PMAdib Faramarzi
07/15/2021, 1:34 PMAdib Faramarzi
07/15/2021, 1:35 PMAdam Powell
07/15/2021, 1:41 PMcould this be related to the fact that I have disabled the new JVM IR backend? (useOldBackend true )
The compose compiler plugin is an IR plugin so yes, you've ensured it's not running on your code by doing this 🙂
Adib Faramarzi
07/15/2021, 1:43 PMrunCatching
) and compose relies on these Kotlin versionsAdib Faramarzi
07/15/2021, 1:45 PMAdam Powell
07/15/2021, 1:46 PMAdib Faramarzi
07/15/2021, 1:48 PMAdib Faramarzi
07/15/2021, 1:56 PMuseOldBackend=true
and everything seems to run smoothly.Nurlibay
07/08/2024, 2:58 PMuseOldBackend=true