Is one of the limitations losing previews unless y...
# multiplatform
j
Is one of the limitations losing previews unless you use intellij IDE? im not againts it, just asking before i go beg the boss for money 😉 if there are ways to have a preview (even within the main kotlin project instead of within the shared module, thats fine, but right now as soon as i include a
stringResource(Res.string.mystring)
it won't generate the preview, maybe my config is just bad?
m
I don't know about the previews, but I would expect the community edition of Intellij to handle anything related to compose that the ultimate version does.
z
String resources should work in previews, there's probably something wrong with the config of your project in this case. Could you open a bug in https://youtrack.jetbrains.com/newIssue?project=KMT with details?
And preview should work without an Ultimate license or in Android Studio too, they're not a paid feature.
j
even using android studio? or only within jetbrains ide?
z
For a sanity check for your IDE environment, you could try a brand new KMP wizard project or kotlinconf-app, both should have working previews with resources. Then if those work, it's something wrong with your project's config.
j
ok thanks thats perfect thing to do so i can validate
z
Oh, and make sure you have the Kotlin Multiplatform IDE plugin installed, in whichever IDE.
y
Did you try to rebuild the project after adding the
stringResource(Res.string.mystring)
to the text composable or any composable that needs it. It only worked for me when i did this
✅ 1