.gitignore for Android + Kotlin
.gitignore for Android apps written in Kotlin, covering Android Studio and Gradle artifacts.
Quick presets
Selected (2)
Android StudioKotlin
Your selections never leave your browser. Generation happens entirely client-side.
18 patterns · 438 B
# Generated by DevZone Tools — https://devzone.tools/tools/gitignore-generator # Templates: Android Studio, Kotlin # 2026-04-20 # ---- Android Studio ---- # Android Studio *.iml .gradle/ /local.properties /.idea/ .DS_Store /build/ /captures/ .externalNativeBuild/ .cxx/ *.keystore !debug.keystore # ---- Kotlin ---- # Kotlin build/ !gradle/wrapper/gradle-wrapper.jar !**/src/main/**/build/ !**/src/test/**/build/ *.class *.log .idea/
Why use Android + Kotlin together?
Android Kotlin projects need to ignore Android Studio metadata (.idea/, *.iml), Gradle build caches, compiled APK/AAB output in build/, and critically the local.properties file which contains the machine-specific Android SDK path.
Release keystores (*.keystore, *.jks) should never be committed — use CI secrets or a secure vault instead. The debug.keystore is safe to commit since it has no production value.
Related combinations
Frequently asked questions
- Do I need to commit .gitignore?
- Yes — .gitignore should be committed to the repository so all collaborators benefit from the same ignore rules.
- How do I add custom patterns?
- Open your .gitignore file and add the pattern on a new line. Use # for comments, * for wildcards, / to match directories, and ! to un-ignore a previously ignored path.
- How do I ignore a file that is already tracked?
- Adding a file to .gitignore does not remove it from tracking if it was previously committed. Run: git rm --cached <file> to stop tracking it without deleting the file locally.
- Why combine Android Studio and Kotlin?
- Android Kotlin projects need to ignore Android Studio metadata (.idea/, *.iml), Gradle build caches, compiled APK/AAB output in build/, and critically the local.properties file which contains the machine-specific Android SDK path.
Looking for something else? Browse all templates →