I just started working on jetpack compose and downloaded sample of Jetnews.
When I opened MainActivity or JetnewsApp.kt I am unable to see preview of Composable function, I added @Preview annotation as well but unable to see live preview.
Can anyone please help me to find live preview.
Thanks in advance.
Today, we're releasing version 1.2 of Jetpack Compose, Android's modern, native UI toolkit, continuing to build out our roadmap.
If you want to use Jetpack Compose in an existing project, you'll need to configure your project with required settings and dependencies. For more information, see Adding Jetpack Compose to your app.
Compose allows you to do more with less code compared to XML. Compose is Intuitive. This means that you just need to tell Compose what you want to show the user. Compose is compatible with all your existing code: you can call Compose code from Views and Views from Compose.
If your Preview never show after add @Preview
annotation in JetnewsApp
class. In my case after adding @Preview
i close project and then open project again it's working fine for me in Macbook pro.
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