I run Intellij, and when I try to run an android app, I always have an internal error: Content is not allowed in prolog. I think that I have tried everything to fix it, but
I have faced this issue today and tried all the solutions given here but nothing helped out. Post spending a day, realized the mistake I did.
I am using intellij community addition and configured external tomcat-9.0.24 via Tomcat Runner plugin. The tomcat is external to intellij whose path needs to be provided in TomcatRunner. The issue is with server.xml of this external tomcat. The content of server.xml is replaced with some junk data which I couldn't identified.
I am sharing this to make others also know that this error can also be caused in any xmls of your server(Tomcat) not just with the xmls of .idea folder.