Android Studio Iguana 2023Koala 2024.2.1
If you create a Gradle project using Android Studio the .gitignore file will contain the following:
.gitignore
*.iml .gradle /local.properties /.idea/caches /.idea/libraries /.idea/modules.xml /.idea/workspace.xml /.idea/navEditor.xml /.idea/assetWizardSettings.xml .DS_Store /build /captures .externalNativeBuild .cxx local.properties I would recommend ignoring the complete ".idea" directory because it contains user-specific configurations, nothing important for the build process.
Gradle project folder
The only thing that should be in your (Gradle) project folder after repository cloning is this structure (at least for the use cases I encountered so far):
app/ .git/ gradle/ build.gradle .gitignore gradle.properties gradlew gradlew.bat settings.gradle Note: It is recommended to check-in the gradle wrapper scripts (gradlew, gradlew.bat) as described here.
To make the Wrapper files available to other developers and execution environments you’ll need to check them into version control.