Error after adding string resources to Compose Multiplatform

44 views Asked by At

I'm getting following error after I added string resources to my compose multiplatform project:

Cannot invoke "org.w3c.dom.Node.getNodeValue()" because the return value of "org.w3c.dom.NamedNodeMap.getNamedItem(String)" is null
at org.jetbrains.compose.resources.GenerateResClassTask.getStringIds(GenerateResClassTask.kt:108)
    at org.jetbrains.compose.resources.GenerateResClassTask.fileToResourceItems

I'm trying to build web target. The gradle build fails with above error.

This is my strings.xml file

<resources>
    <string>Hello World</string>
</resources>
1

There are 1 answers

0
Shreyash.K On

I wasn't giving name to the string entries :P. This compiled successfully

<resources>
    <string name="hello">Hello World</string>
</resources>