https://stackoverflow.com/questions/49834961/the-module-app-is-an-android-project-without-build-variants
It's an old one, but a good'un, try File -> Invalidate Caches / Restart, failing that you could try clearing your gradle cache manually. If this is happening across multiple projects, that were working, this solution sounds most plausible