Android Studio Modules are not updated when switching git branches

Viewed 187

When I create new branch 'Branch1' and then add new module 'branch1' to it and commit the changes. Then when I switch to the 'master' branch the module is still visible as seen in the image below.

enter image description here

I can solve the problem by refreshing the Gradle from View > Tools Windows > Gradle, then right click and then Reload Gradle Project. Or using Invalidate cache restart, but is slower than simply refreshing the gradle.

But is there more generic solution, that does that gradle sync automatically, when switching branches or stashes?

enter image description here

0 Answers
Related