Hello people, Is there a CMP project Sample where ...
# multiplatform
s
Hello people, Is there a CMP project Sample where I can play around with the previews? Is it possible to have previews for Android and iOS targets?
f
The only preview really working for now is on AndroidStudio.
So, I guess, the best IDE for now, if for want a full support for preview.
s
Does the preview work for all targets? I'm testing some samples from jetbrains and other and I have no previews at all 😅
f
It's depends on what IDE you're using and the target...
s
Tried Android studio Ladybug and Fleet
f
Fleet has basic support for preview, there are working on it.
👍 1
With AndroidStudio + cmp, code your view in the commonMain and create your preview in the androidMain, it should work
s
So the correct IDE for Kotlin multi platform is Android Studio for now
I'll try again AS
f
For the preview, yes.
s
testing this sample https://github.com/SEAbdulbasit/MusicApp-KMP , no previews.. lets try to add them
great. didn't work
f
Depends, if the code has been made to be previewable ...
s
I added the @Preview annotation and dependencies
I'll start a sample project..
a
I read somewhere that you need to place the previews to androidMain sourceset
s
Yes that works. Thank you.
k
the generated project has a preconfigured preview out-of-the-box