:question:I have problems getting resources to wor...
# compose
m
I have problems getting resources to work in a multi-platform project. See a minimal example (generated by https://kmp.jetbrains.com/) here: https://github.com/melli79/helloMultiPlatform-240713 Problem: When you generate the project, the
hellomultiplatform.composeapp.generated.resources.Res
is mostly empty, i.e. it does contain 5 objects
drawable
,
string
,
array
,
plurals
,
font
, but they are all empty even though "composeApp/src/androidMain/res/values/strings.xml" contains a single string
appName = "Hello MultiPlatform"
(as XML). I expected, the 5 Res-objects to contain some properties as is common in Android projects. Is it possible that "org.jetbrains.compose.componentcomponent resources1.6.11" is still in alpha phase? Should I add anything to the build.gradle.kts files? Are there currently any workarounds? (I tried all the suggestions from the Gemini tutor in the Android Studio, but had no success.) Thanks for suggestions Melchior
1
a
Did you try adding your resources inside the
composeResources
folder?
I move your string.xml to the composeResources folder and it's being generated
m
Yess. Now it works. This was the only resource directory I had not yet tested. Thanks you very much.
👍🏻 1