I'm going through the tutorials about Jetpack which is ran in the Android Studio 4.0(Canary), please refer to the link post below.
https://developer.android.com/jetpack/compose/tutorial
Everything is ready except I can't find the preview window since I try to preview the "Composable" method.
Can someone give me an exact hint that where the preview window is?
Check the official site:
Beginning with Android Studio 4.0 Canary 1, Android Studio lets you preview your composable functions within the IDE, instead of needing to download the app to an Android device or emulator. The main restriction is, the composable function must not take any parameters. Add the
@Preview
annotation before@Composable
.
Then select on the top-right the Editor and Preview toggle.
To update the preview click the Build Refresh button.
You have to build the project first (Build -> Make Project). I also had to restart Android Studio in order for previews to start working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With