Today opened a few days ago to do a project and found that after running unexpectedly appear
Error:internal error: (org.jdom.input.JDOMParseException) error on line 1: The preface does not allow content.
Org.jdom.input.JDOMParseException:Error on line 1: There is no content allowed in the preface.
At Org.jdom.input.SAXBuilder.build (saxbuilder.java:533)
At Org.jdom.input.SAXBuilder.build (saxbuilder.java:946)
At Com.intellij.openapi.util.JDOMUtil.loadDocument (jdomutil.java:364)
At Com.intellij.openapi.util.JDOMUtil.loadDocument (jdomutil.java:342)
At Org.jetbrains.jps.model.serialization.JpsLoaderBase.tryLoadRootElement (jpsloaderbase.java:99)
At Org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement (jpsloaderbase.java:72)
At Org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement (jpsloaderbase.java:43)
At Org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents (jpsloaderbase.java:55)
At Org.jetbrains.jps.model.serialization.JpsProjectLoader.loadFromDirectory (jpsprojectloader.java:119)
At Org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject (jpsprojectloader.java:98)
At Org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel ( JPSSERIALIZATIONMANAGERIMPL.JAVA:41)
At Org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel (jpsmodelloaderimpl.java:45)
At Org.jetbrains.jps.cmdline.BuildRunner.load (buildrunner.java:78)
At Org.jetbrains.jps.cmdline.BuildSession.runBuild (buildsession.java:261)
At Org.jetbrains.jps.cmdline.BuildSession.run (buildsession.java:124)
At Org.jetbrains.jps.cmdline.buildmain$mymessagehandler$1.run (buildmain.java:238)
At Org.jetbrains.jps.service.impl.sharedthreadpoolimpl$1.run (sharedthreadpoolimpl.java:41)
At Java.util.concurrent.executors$runnableadapter.call (Unknown Source)
At Java.util.concurrent.FutureTask.run (Unknown Source)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
At Java.util.concurrent.threadpoolexecutor$worker.run (Unknown Source)
At Java.lang.Thread.run (Unknown Source)
caused by:org.xml.sax.SAXParseException; linenumber:1; columnnumber:1; No content is allowed in the preface.
...
The problem. A few days ago, this project in this machine was able to run. I haven't moved anything for a few days. But I can't even run it. Then I Baidu Google, found in the Chinese site there is no solution to this problem. There is a description of the problem in stack Overflow. Although the presentation is not quite the same,Content is not allowed in prolog. 不过猜一下也知道应该是我的问题。
The address of the problem is: Http://stackoverflow.com/questions/25507998/intellij-idea-crashed-and-now-i-have-error
The description is similar.
For the best method, delete the C:\Users\ user name \. Intellijidea14\system\caches, I still haven't solved it after the experiment.
And then follow the second-best way
My solution
In project/.idea I has broken workspace.xml file. I just close Android Studio (Intellij idea), remove this file and start Android Studio.
All of the other approaches does work for me.
That is, delete the. Idea/workspace.xml in the project folder and discover that it is ready to run.
So the conjecture should be workspace.xml this file is broken. As to why it's broken. I don't know.
IntelliJ (org.jdom.input.JDOMParseException) Error on line 1: content is not allowed in the preface.