What should be in my .gitignore for an Android Studio project?

發現開一個新的 Repository  來放 android studio 的 source code,需要手動去設定  ~/.gitignore 檔案,如果沒有設會加入很多垃圾檔案進 git 裡。設定檔:

#built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties

# Windows thumbnail db
Thumbs.db

# OSX files
.DS_Store

# Android Studio
*.iml
.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
.navigation
captures/
output.json 

#NDK
obj/
.externalNativeBuild

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *