Skip to content
mobile20 active rulesVerified 2026-09-30

Android .gitignore Template

Android Studio local properties, build outputs, and Gradle cache. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.

Interactive Stack Generator

Preconfigured with Android
Search for templates
Quick add:
Selected1
Android
Selected Templates (1)
.gitignore
20 rules
### Android ###
# Gradle files
.gradle/
build/
.kotlin/
# Local configuration file (sdk path, etc)
local.properties
# Log/OS Files
*.log
# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.aab
*.apk
output-metadata.json
# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml
# Keystore files
*.jks
*.keystore
# Google Services (e.g. APIs or Firebase)
google-services.json
# Android Profiling
*.hprof
37 lines•UTF-8
Deterministic

Raw Android .gitignore

Crawlable upstream source template
android.gitignore•36 lines•UTF-8
# Gradle files
.gradle/
build/
.kotlin/
# Local configuration file (sdk path, etc)
local.properties
# Log/OS Files
*.log
# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.aab
*.apk
output-metadata.json
# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml
# Keystore files
*.jks
*.keystore
# Google Services (e.g. APIs or Firebase)
google-services.json
# Android Profiling
*.hprof

Key Pattern Breakdown

Build Outputs & Compiled Artifacts

Generated binary files, compilation targets, and distribution bundles that can be reliably reproduced from source.

build/.externalNativeBuild/*.aab*.apkoutput-metadata.jsondeploymentTargetDropDown.xml

Environment Secrets & Local Overrides

Local environment configurations, secrets, and credentials intended to protect developer-specific settings from exposure.

*.keystore

Execution Caches & Runtime Logs

Diagnostic logs, runtime metadata, test coverage reports, and incremental compiler caches that cause noisy repository diffs.

*.log

Operating System & Workspace Files

Editor-specific workspace configuration and OS filesystem metadata generated automatically by host operating systems.

.idea/

Source & Verification

License: CC0-1.0

Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.