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:
- Delete
.idea
folder. - Create a new temporary Flutter project with the same name.
- Copy from the project to your existing project these 2 missing files:
[project_name].iml
android/[project_name]_android.iml
- 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.
Latest posts by Sushant K (see all)
- [SOLVED] Flutter : Waiting for another flutter command to release the startup lock. - July 2, 2021
- How to Change Passport Token length in laravel. - June 12, 2021
- Flutter : How to dismiss an AlertDialog on Button? - June 7, 2021