I had this problem for a while and was able to solve it myself.
If in opening your project in Android Studio and something similar to this error message pops up:
I am using Android Studio 4.0 I solved this by:
Deleting .idea folder in the Project
.idea
Restart Android Studio
Done :)