Try this:
Close Android Studio.
Delete or rename all of the
*.iml
files associated with this project and its modules. AFAICT, there is one at the project root and one in each module.Restart Android Studio, allowing it to rebuild the
*.iml
files.
I ran into a similar situation yesterday, and this resolved it.