Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to open flutter project on android studio after upgrade

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
like image 562
Jimmy Bower Avatar asked May 12 '19 15:05

Jimmy Bower


People also ask

Can I open flutter project in Android Studio?

Step 1: Open the Android Studio and select Tools from the menu bar and click on SDK Manager. Step 2: In the newly open window click on the plugins and in the search bar search for Flutter and Dart and then install it. Step 4: Now after installing Flutter and Dart we are ready to import a Flutter project.

How do I change the Android version on flutter?

How to update app version in Flutter. To update the app version in Flutter, you can simply open the pubspec. yaml file and then update the version tag. Inside the version tag, just increase the build number (for Android) or CFBundleVersion (for iOS).

Is there an alternative to Android Studio flutter?

Flutter is a mobile app SDK to help developers and designers build modern mobile apps for iOS and Android. Android Studio belongs to "Integrated Development Environment" category of the tech stack, while Flutter can be primarily classified under "Cross-Platform Mobile Development".


2 Answers

The problem is caused by <projectname>.iml inside the root project folder.

  1. First cut the file from the folder and paste it somewhere else
  2. Restart Android Studio
  3. Close it again and put <projectname>.iml back into the root folder
  4. Restart Android Studio once again
like image 86
akshay yadav Avatar answered Oct 07 '22 18:10

akshay yadav


Just delete .idea folder from project directory an re run android studio. it worked for me.

like image 41
MHDEZ Avatar answered Oct 07 '22 19:10

MHDEZ