Thursday, 17 May 2018

Add .gitignore file in android studio project

When we compile android project then few auto generated file automatically generated.
These auto generated files are not required during code commit. We can ignore auto
generated file from android project using below .gitignore file.

Follow below steps to add .gitignore file in your git project directory.

1. Open notepad and copy paste below text.
2. Save it using file name like abc.gitignore.
3. Put .gitignore file at root directory of project. After that clean your project.


#built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# built native files (uncomment if you build your own)
# *.o
# *.so

# generated files
bin/
gen/

# Ignore gradle files
.gradle/
build/

# 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/

No comments:

Post a Comment