The problem is caused by missing
.iml project files. These files are added automatically to the
.gitignore file but they should not. To fix it:
- Create a new temporary Flutter project with the same name.
- Copy from the project to your existing project these 2 missing files:
- Open Android Studio and the problem should be gone.
To avoid it in the future, make sure .iml files are not excluded in the gitignore. There is a Github issue on this topic.
- [SOLVED] Flutter:Not showing “Open for editing in Android Studio” - June 4, 2021
- [Solved] Flutter : [core/not-initialized] Firebase has not been correctly initialized. Have you added the “google-services.json” file to the project? - May 21, 2021
- [SOLVED] Flutter : NoSuchMethodError: The getter ‘isEmpty’ was called on null. - May 21, 2021