moko-resources icon indicating copy to clipboard operation
moko-resources copied to clipboard

`stringResource(resource: StringResource): String` doesn't work with compose multiplatform js target

Open isning opened this issue 3 years ago • 2 comments

When i start js browser run, the console alerts IrLinkageError with message Function 'stringResource' can not be called: No function found for symbol 'dev.icerock.moko.resources.compose/stringResource|stringResource(dev.icerock.moko.resources.StringResource;androidx.compose.runtime.Composer?;kotlin.Int){}[0]' and leave me with blank browser view.

But desktop target and android target both work well

It‘s a simple demo like this:

val myString = stringResource(MR.strings.my_string)
Text(myString)

isning avatar Nov 20 '23 16:11 isning

It fixed after I run gradle clean to clean the project build

isning avatar Nov 21 '23 13:11 isning

I m also getting this error now with compose 1.6.1, And its not working even after clearing build.

sunildhiman90 avatar Apr 26 '24 10:04 sunildhiman90