Boke android studio when previewing
package com.example.alectrico
import ...
import androidx.compose.ui.tooling.preview.Preview
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
AlectricoTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background,
) {
Greeting()
/*BakingScreen()*/
}
}
}
}
}
@Composable
fun Greeting(name: String = "alectrico", modifier: Modifier = Modifier) {
Surface(color = Color.Cyan) {
Text(
text = "Hi, my name is $name!",
)
}
}
@Preview
@Composable
fun SimpleComposablePreview() {
Greeting()
}
In the rol of testing my new kotlin app
As I don’t want to start runing virtual devices
I put @Preview on the function
So I can see the preview instead the real output
Android Studio LadyBug
But I broke Android Studio with
Slow render action 0/3