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 : PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) - December 7, 2021
- [Solved] Flutter : Error: The getter ‘subhead’ isn’t defined for the class ‘TextTheme’ from package:flutter/src/material/text_theme.dart’ – searchable_dropdown - December 6, 2021
- [SOLVED] Flutter Error: The getter ‘body1’ isn’t defined for the class ‘TextTheme’ – place_picker. - December 6, 2021