Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij IDEA crashed, and now throws an error

I work in Intellij IDEA, but my computer freezes so I turn off my computer. (long click power button) When I turned on computer and start IntelliJ IDEA I had this error:

Cannot load settings from file 'C:\Users\user\.IdeaIC13\config\options\code.style.schemes.xml': java.lang.AssertionError: Unexpected content storage modification File content will be recreated 

I close IDEA and start again, now I don't have the previous error, but when I open my project I have this error:

Error:Internal error: (org.jdom.input.JDOMParseException) Error on line 1: Content is not allowed in prolog. org.jdom.input.JDOMParseException: Error on line 1: Content is not allowed in prolog.     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.loadRootElement(JpsLoaderBase.java:69)     at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:40)     at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(JpsLoaderBase.java:52)     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:71)     at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:198)     at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)     at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)     at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)     at java.lang.Thread.run(Thread.java:745) Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)     at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1436)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)     at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)     ... 20 more Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)     at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1436)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)     at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)     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.loadRootElement(JpsLoaderBase.java:69)     at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:40)     at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(JpsLoaderBase.java:52)     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:71)     at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:198)     at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)     at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)     at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)     at java.lang.Thread.run(Thread.java:745) 

How can I fix this problem?

like image 659
bvv Avatar asked Aug 26 '14 14:08

bvv


People also ask

How do I fix IntelliJ errors?

Apply fixes in the Problems tool window All detected problems are listed in the left part of the tool window. Click a problem to display inspection details on the right. icon on the toolbar or in the context menu. You can also press Alt+Enter and select a suitable fix from the popup menu.

How do I restore changes in IntelliJ?

Revert uncommitted changes You can always undo the changes you've made locally before you commit them: In the Commit tool window Alt+0 , select one or more files that you want to revert, and select Rollback from the context menu, or press Ctrl+Alt+Z .

How do I recompile IntelliJ?

Open the needed file in the editor and from the main menu, select Build | Recompile 'class name' ( Ctrl+Shift+F9 ). Alternatively, in the Project tool window, right-click the class you need and from the context menu, select Recompile 'class name'.

How do you jump to error in IntelliJ?

Navigate between errors or warnings To jump to the next or previous found issue in your code, press F2 or Shift+F2 respectively. Alternatively, from the main menu, select Navigate | Next / Previous Highlighted Error. IntelliJ IDEA places the caret immediately before the code issue.


2 Answers

This answer works for both IntelliJ & AndroidStudio

If you cannot even open your project in IntelliJ[AndroidStudio]:

  • Close IntelliJ[AndroidStudio]
  • Go to the directory <your_home>/.IntelliJIdeaXX[.AndroidStudioXX]/system/cache

    WHERE

    • <your_home> is

      • Windows Users: C:\Users\<**Your User**>\ (or %USERPROFILE%)
      • Linux Users(Ubuntu), Mac: ~/
    • XX is your IntelliJ version (This directory is "caches" in some versions.)

  • Remove all the files in the cache directory.
  • Then restart IntelliJ[AndroidStudio]

This has worked for me in the past.

like image 73
Ask613 Avatar answered Oct 13 '22 00:10

Ask613


my solution

In project/.idea I have broken workspace.xml file. I just close Android Studio (Intellij IDEA), remove this file and start Android Studio.

All other approaches not work for me.

like image 36
ViT-Vetal- Avatar answered Oct 12 '22 23:10

ViT-Vetal-