Skip to content
Advertisement

Android Studio error in build – Cause: startElement.getAttributeByName(QName(“name”)) must not be null

I want to create a spinner widget, and I added this to string.xml:

JavaScript

and I adapted it:

JavaScript

and I got a build error:

JavaScript

How can I solve this?

Advertisement

Answer

Special character like apostrophe(‘) are not allowed in xml directly Use can use escape sequences to get the desired result.

Replace: Today’s by Today ‘s

Use a backslash symbol before apostrophe ‘

Advertisement