Android Studio error: "Compilation is not supported for following modules: capacitor-android."

Im having same error, the only way i found so far is to close Android Studio and delete .idea folder. The error occurs always when i open Module Settings and change version of the app