Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.47f1
2022.3.55f1
6000.0.33f1
6000.1.0a9
Issue ID
UUM-91586
Regression
No
AndroidManifest.xml detects the “<” symbol between tags as invalid and outputs an "System.Xml.XmlException" error failing the build
Steps to reproduce:
1. Open the attached user's project "Test22353.zip"
2. Switch to Android and build
3. Observe the console error
Expected results: The previous XML format should still work with newer versions of the editor despite the Gradle and AGP upgrades
Actual results: AndroidManifest.xml detects the “<” symbol between tags as invalid and outputs an "System.Xml.XmlException" error failing the build
Reproducible: 2021.3.47f1, 2022.3.55f1, 6000.0.33f1, 6000.1.0a9
Testing Environment: Windows 11 23H2
Not reproducible on: no other environment tested
Notes:
-Workaround: Open the AndroidManifest.xml file -> Go to line 6 and erase the “<” character at column 92 -> Try the build. It should work now
-User reported that the issue does not reproduce on 2022.3.37f1 (assigning <google_ad_manager_app_id> dynamically) and reproduces with 2022.3.38f1, however I could reproduce the issue below 2022.3.38f1
-Gradle and AGP upgrade from 7.2 to 7.5.1 and 7.1.2 to 7.4.2 coincides with 2022.3.38f1 reproducing the issue for the user
-The XML files passes validators. The issue only happens with the “<” character, if the “>" character is left there are no problems. It seems to be an issue with the XML parser
-Error message:
System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid attribute character
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
Unity uses the standard C# System.XML parser, <, > and & are reserved in XML, they must be encoded with < > and & if they're not part of tags. We cannot reproduce the fact it used to work on earlier versions (all versions throw the Xml error with un-encoded < character). If we can get a reproduction that shows a distinct regression then we can re-investigate this ticket. However, I would suggest using different characters to mark out dynamically replaceable text in XML.