Reputation: 311
Yesterday I've upgraded my Windows 7 SP1 Powershell from 2 to 5.1, and upgraded flutter and dart to latest version using the flutter upgrade
command, all worked fine, and I continued working as normal. Today after trying to access my project again I got a couple of errors, and all of my project structure gone. What can I do? and why that happened? Was that due to the upgrade? or something else?
Load Settings
Cannot load settings from file 'C:\Users\user\Documents\FlutterProjects\project\android\project_android.iml': ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
Please correct the file content
Load Settings
Cannot load settings from file 'C:\Users\user\Documents\FlutterProjects\project\project.iml': ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
Please correct the file content
Upvotes: 15
Views: 9161
Reputation: 1
You can just go to your extensions tab on vscode search for dart and later for flutter and click on the Switch to Release Version Button.
reloading your version is required after this fix.
Upvotes: 0
Reputation: 399
Don't delete or rename any file in your project but when you update flutter, you must have compatible version from other plugins and dependencies with your new version, so do this steps and run again it will be ok:-
1- Close android studio and open it again
2- From terminal tab down in android studio run (flutter clean)
3- From terminal also run (flutter doctor)
4- Then run (flutter doctor -v)
5- After all at last run (pub outdated)
6- Close android studio and restart
7- Run your project and enjoy.
Upvotes: 0
Reputation: 11
simply cut the (PORJNAME).iml into the desktop and re-run the IDE or android studio. after re-running close the ide again and move back the (PORJNAME).iml to their own place, and open the ide
Upvotes: 0
Reputation: 896
Just delete .idea folder from project directory an re run android studio. it worked for me.
Upvotes: 27
Reputation: 484
The problem is caused by <projectname>.iml
inside the root project folder.
<projectname>.iml
back into the root folderUpvotes: 22