Intellij Content is not allowed in prolog

前端 未结 6 1629
独厮守ぢ
独厮守ぢ 2020-12-11 00:41

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

相关标签:
6条回答
  • 2020-12-11 01:21

    Check first line of xml files in .idea folder. Remove their content if error is given by intellij. They will be regenerated by intellij. And everything will work fine then.

    0 讨论(0)
  • 2020-12-11 01:32
    1. close Intellij idea
    2. go to your workspace
    3. deleting .idea folder
    4. open your project and import it.
    0 讨论(0)
  • 2020-12-11 01:32

    This usually happens when you have added some syntactically incorrect characters to an XML file in the very first line

    which should always be

    <?xml version="1.0" encoding="utf-8"?> (prolog)

    0 讨论(0)
  • 2020-12-11 01:35

    Just Open Workspace.XMl and check is there any In-Valid XML content. Or else delete all from Workspace.xml and compile again.

    0 讨论(0)
  • 2020-12-11 01:37

    I can't see anything specific to the AndroidManifest in there. Maybe one of your project files is corrupt?

    Appears to be the same as this question: Android Studio Issue - Premature end of file

    0 讨论(0)
  • 2020-12-11 01:39

    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.

    0 讨论(0)
提交回复
热议问题