I’m encountering an issue during my Android project build in Android Studio. The build fails with the following error:
org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
at java.xml/com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttribute(Unknown Source)
at com.android.ide.common.resources.NodeUtils.processSingleNodeNamespace(NodeUtils.java:206)
at ...
Here are the details of my environment:
I’ve already tried the following without success:
Could anyone suggest a solution or help identify the root cause? It seems related to XML resources, but I couldn’t find any obvious illegal characters.
Any help would be greatly appreciated!
Thanks in advance.
I discovered that the issue was due to the default language of the device. It was causing an invalid character error during the build process. Changing the system language to English resolved the issue, and the build completed successfully.