在AndroidStudio中.gitignore文件如何配置

在Androidstudio中打开一个android项目(在这里我们以project方式打开),能够看到工程中其实有两个.gitignore文件。如下图所示:

gitignore文件位置

这两个文件都需要配置。app目录下gitigonre文件内容为:/build。也就是我们需要忽略掉build文件夹下的内容。

另一个gitigonre文件内容如下所示:

# Built application files

*.apk

*.ap_

*.aab

# Files for the ART/Dalvik VM

*.dex

# Java class files

*.class

# Generated files

bin/

gen/

out/

# Gradle files

.gradle/

build/

# Local configuration file (sdk path, etc)

local.properties

# Proguard folder generated by Eclipse

proguard/

# Log Files

*.log

# Android Studio Navigation editor temp files

.navigation/

# Android Studio captures folder

captures/

# IntelliJ

*.iml

.idea/workspace.xml

.idea/tasks.xml

.idea/gradle.xml

.idea/assetWizardSettings.xml

.idea/dictionaries

.idea/libraries

.idea/caches

# Keystore files

# Uncomment the following line if you do not want to check your keystore files in.

#*.jks

# External native build folder generated in Android Studio 2.2 and later

.externalNativeBuild

# Google Services (e.g. APIs or Firebase)

google-services.json

# Freeline

freeline.py

freeline/

freeline_project_description.json

# fastlane

fastlane/report.xml

fastlane/Preview.html

fastlane/screenshots

fastlane/test_output

fastlane/readme.md

其中"#"表示注释,"*"表示通配符,可多个,"/"表示目录

你可能感兴趣的:(在AndroidStudio中.gitignore文件如何配置)