is there anyother way to use string resources in c...
# multiplatform
r
is there anyother way to use string resources in compose mutliplatform without
moko:resources
?
i would love to use moko, but its not working for me 🤦‍♂️ been trying for hours, keep saying “Expected object ‘SR’ has no actual declaration in module PrayerCompanionAndroid.shared.main”
so I was looking if there is any other native way to do it, but couldn’t find anything
k
This is just an ide error. I have this since a long time and everything just works fine.
👀 1
r
it doesn’t run
or idk if I tried honestly 😅
but when I click “Rebuild” keeps telling me build failed
k
can you show the log?
r
yeah, well, I removed everything and tried to see a native way to do it, let me reimplement and share with you
btw, any idea why I get these errors
k
no sorry never seen this
r
oki thanks
ok trying moko again now
Copy code
Expected object 'SR' has no actual declaration in module <shared_debug> for JVM
here is the error
s
if you set kotlin version to 1.8.22 it works but if you update beyond this version then you start getting this error its moko issue they need to fix it.
z
oh I think I actually solved this by adding an explicit dependency on the commonMain source set in the JVM sourceSet
dependsOn(commonMain)
it's working for me on 1.9.10
r
can you share your code for jvm set? I don’t have it at all
Copy code
Expected object 'SR' has no actual declaration in module <shared_release> for JVM
Expected object 'SR' has no actual declaration in module <shared_debug> for JVM
now its showing this I have 2 build types idk if thats related
but even when I see the actual implementation I only see iOS, can’t find anything from android SR = SharedRes
oh 🙂 apparently support for kotlin 1.9 is still pending 🤦‍♂️ I’m using 1.9.10
okay this thing is stupid 😅 I’ve wasted hours and it is not stable at all
I have a strings file in common main that has
test
string, and it is generated, but when I run the app it shows a random string from my androidApp strings file..