您的位置:首页 > 移动开发 > Android开发

What should be in my .gitignore for an Android Studio project?提交到git上的文件

2017-08-30 16:10 627 查看
Update: Since Android Studio 2.2, new projects are created with this gitignore
file:
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild


Verify if it suits your needs and if not, read on.

Previous:

A late answer but none of the answers here and here was
right on the money for us...

So, here's our gitignore file:
#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

# Eclipse project files
.classpath
.project

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

#NDK
obj/


Optional - for older project format, add this section to your gitignore file:
/*/out
/*/*/build
/*/*/production
*.iws
*.ipr
*~
*.swp


This file should be located in the project's root folder and not inside the project's module folder.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐