I am using Android Canary 4 for android developmen...
# compose
a
I am using Android Canary 4 for android development using compose. I want to know is there any issue with compose or canary editor as it cannot able show preview window even after cleaning and rebuilding an app. I also noticed that even after adding file inside
resources
folder, editor shows error that file doesn't exists.
Is there any way to overcome this issue without restarting the editor each and everytime.
l
It’s not clear what’s the problem
a
I am not able to view preview window even after using
@Preview
function. Second problem is that even after adding drawable resource file inside
res
folder, editor show red as it wasn't able to find that file.
c
can you share your
@Preview
function?
a
Copy code
@Preview
@Composable
fun SettingPreview() {
    SettingTicket("Billing")
}
l
Have you tried closing/reopening AS? 🧌
a
Closing the entire editor and restarting solve this issue.
l
And what if you update the message and rebuild?
It the @Preview updated?
Or do you have to restart the IDE everytime?
a
Once the preview got loaded it work fine. Update show in preivew after refresh. But if I create new file with new preview function then I need to restart entire editor to see the preview window.
l
Just use a
Preview.kt
file which holds all the `@Preview`s 🧌
a
Okay 👍
a
Probably just closing and opening again the file also helps. It is currently needed when you introduce the first preview in the file to workaround the bug
l
Is there a bug filed for this? Can we have a link?
l
Thanks! 🙂