Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fix Android Studio Corrupted Project Workspace Settings

I had this problem for a while and was able to solve it myself.

If in opening your project in Android Studio and something similar to this error message pops up:

Cannot load settings from file (C:\Users\User\AndroidStudioProjects\ProjectName\.idea\workspace.xml): Error on line 1: Content is not allowed in prolog. Please correct the file content.
like image 614
Nico Dumdum Avatar asked Sep 23 '14 02:09

Nico Dumdum


4 Answers

It probably means your project workspace settings file is corrupted by whatever reason and Android Studio could not read it. Mine is probably because of BSOD, because Windows.

To solve the error, just delete the workspace.xml as specified in the error message. It is ok to delete it since you probably already lost all your custom workspace settings when the file got corrupted and you will never be able to save new workspace settings unless you fix the corrupted file. After deleting it, the next time you open your project in Android Studio, it will try to look for the workspace file, and if it can't find it, it will just create a new valid one.

I hope this helps! :)

like image 158
Nico Dumdum Avatar answered Nov 09 '22 16:11

Nico Dumdum


Step 1 :Exit Android Studio.

Step 2 :Delete workspace.xml file found in the \ProjectName\.idea\ directory.

Step 3 :Run Android Studio again.

like image 33
Patriotic Avatar answered Nov 09 '22 17:11

Patriotic


On a Mac, I found File > Invalidate Caches/Restart did the trick.

like image 16
Andrew Wyld Avatar answered Nov 09 '22 16:11

Andrew Wyld


on a windows 8.1, I found File > Invalidate Caches/Restart did the trick

like image 12
Paola Alicia Hernandez Franco Avatar answered Nov 09 '22 15:11

Paola Alicia Hernandez Franco