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:
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.
If you are using a version control system like github, the easiest way is to erase your project folder, open IntelliJ and clone your repository again. Whatever file is corrupted is going to be gone and it should work fine again.
Try File
-> Invalidate Caches / Restart ...
I had the same problem when Windows crashed while Android Studio was on. I followed the following steps :-
.idea
directory outside the project folder. Note : Do not delete the .idea
directory inside the project folder. The .idea
directory which you have to delete will contain some .iml
files.
I had the same problem, I removed the .idea directory and *.iml files and created the project again.
I've found on several occasions that "Content is not allowed in prolog" presented when I had an XML file with leading spaces in front of the xml or doc type declarations at the start of the file.
I had the same symptoms, and was able to solve by closing the project and going through each of the XML files in the project ".idea" folder. In my case, I found that somehow a few hundred lines of leading whitespace had been added to the "workspace.xml" file. I removed the leading whitespace from the file, restarted IDEa and everything worked again.