class MyActivityCompose : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
Greeting("Android")
}
}
}
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
ad i have this error
java.lang.NoSuchMethodError: No static method setContent$default(Landroidx/activity/ComponentActivity;Landroidx/compose/runtime/CompositionContext;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V in class Landroidx/activity/compose/ComponentActivityKt; or its super classes (declaration of ‘androidx.activity.compose.ComponentActivityKt’ appears in /data/app/~~Ft9dSkXEHEzaK6HUxVW0Mw==/com.xxx.xxx.preprod-G6wAmGkpV4l7HVqxZrBhrg==/base.apk)