https://kotlinlang.org logo
#compose
Title
# compose
p

Prashant Priyadarshi

12/27/2020, 2:56 PM
Preview toolbar is not appearing for my compose function, is there any setting which I may be missing. PS I restarted android studio , it doesn't work As of now I am using compose alpha09 and its an existing project also consisting of non compose code for UI @Preview @Composable fun PreviewTopBar(){ SamplePreviewFunction() }
a

Adam Powell

12/27/2020, 3:36 PM
What version of Android Studio are you using? Preview and other Compose tooling are only present on the canary builds of Android Studio.
p

Prashant Priyadarshi

12/27/2020, 3:58 PM
@Adam Powell arctic fox 2020.3.1 canary 2
I have imported ui-tooling library in my project
is there anyother library that I am missing
a

Adam Powell

12/27/2020, 4:00 PM
Not sure. You might compare gradle files against a new compose project created from the ide, and confirm that the preview works as expected from that new project
c

Colton Idle

12/28/2020, 2:01 PM
@Prashant Priyadarshi try canary 3?
p

Prashant Priyadarshi

12/28/2020, 3:10 PM
@Colton Idle doesn't work with canary 3 either. However a new project with compose only code has a preview window . May be it has something to do with non compose code for ui in the existing project
k

Kshitij Patil

12/29/2020, 9:57 PM
I'm also facing the similar issue, i thought it has to do with AS version as I was using AS 4.2 Canary 8 but now as you're facing this even in Arctic fox, it makes me wonder whether it's Compose specific issue. I'm also using compose
alpha09
and have tried AS 4.2 Canary 8,13,14,15,16 so far, didn't work anywhere plus compose
alpha09
brings Navigation safeargs issue in the latest canary releases of AS.
👍 1
a

adeyds

05/27/2021, 8:49 AM
have yo got solution for this? @Prashant Priyadarshi i got this issue on my project too, compose preview toolbar unavailable😅