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

Open in Full Generator
Search for templates
Quick add:
Selected1
Android
Selected Templates (1)
.gitignore
### 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
20 rules1 template37 lines
Deterministic

Raw Android .gitignore

Crawlable upstream source template
android.gitignore36 lines
# 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 & Compilation Artifacts

Ignores compiled binaries, intermediate object files, and build output directories generated during development.

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

Environment & Secrets

Prevents leaking sensitive local credentials, API keys, database URLs, and environment configuration files.

*.keystore

Cache & Temporary Files

Ignores compiler caches, test runner coverage data, and transient temporary scratch files.

*.log

System & Editor Files

Filters out operating system metadata and workstation-specific editor configuration folders.

.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.