Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot convert project... Premature end of file error in Intellij IDE

I am using Intellij IDEA as an IDE for running Java programs. Dues to power fluctuation computer got restarted. Now when I launch the IDE after reboot i am getting the error Cannot convert project: /home/aniket/IdeaProjects/JavaDemoCodes/.idea/workspace.xml: Error on line -1: Premature end of file.

Has anyone encountered this situation before? What can I do to view my project back again?

like image 811
Aniket Thakur Avatar asked Jul 20 '13 09:07

Aniket Thakur


2 Answers

I also had this after a power failure, I simply deleted the workspace.xml file from the projects .idea folder, restarted IntelliJ and it seemed to be OK apart from loosing which files were open.

Cheers, Nick

like image 57
Nick Middleweek Avatar answered Nov 18 '22 16:11

Nick Middleweek


I had this exact error when my laptop bluescreened. I solved it by:

  • Exit IntelliJ IDEA
  • Rename .idea folder
  • Start IntelliJ IDEA
  • Create new project from existing sources
  • Exit IntelliJ IDEA
  • Copy all files from old .idea folder to newly created one.
  • Restart IntelliJ IDEA
like image 34
Colin Pickard Avatar answered Nov 18 '22 16:11

Colin Pickard