Shreyash.K
Shreyash.K

Reputation: 1138

Error after adding string resources to Compose Multiplatform

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>

Upvotes: 0

Views: 289

Answers (1)

Shreyash.K
Shreyash.K

Reputation: 1138

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

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

Upvotes: 0

Related Questions