Apparently Android Studio/Gradle found it necessary to completely wreck the project after I moved it into the Git repository. It should now be in a not-completely-broken state again.