Android 앱의 일반적인 .gitignore 파일 아래에 두십시오 . 다음 단계는 제외를 설정하는

명령 줄 ( mac 터미널 )을 통해 Android 프로젝트를 git ( beanstalk ) 버전 제어 아래에 두십시오 . 다음 단계는 제외를 설정하는 것입니다.

이미이 길을 걸어온 분들께 :

Android 프로젝트에서 일반적인 .gitignore 파일은 어떤 모습이어야합니까?

Eclipse에서 설정된 프로젝트



답변

Android.gitignore 를 혼합 할 수 있습니다 .

# 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

Eclipse.gitignore :

*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath

답변

다른 사람들이 제안한 것 외에도 proguard사용중인 경우 폴더 를 추가하고 싶습니다 . 전체 폴더를 무시하거나 dump.txt, seeds.txtusage.txt. 기본적으로 mapping.txt사용자로부터 난독 화 된 스택 추적을 디버깅 할 수 있도록 버전 을 유지하는 것이 좋습니다 . 자세한 내용은 여기를 참조 하세요 .


답변

이것은 내 표준 Android .gitignore.hgignore파일입니다. 일반적으로 꽤 잘 작동합니다.

bin
gen
target
.settings
.classpath
.project
*.keystore
*.swp
*.orig
*.log
*.properties
seed.txt
map.txt

eclipse, vim .swp 파일, mavens 대상 폴더 및 proguard 매핑 파일이 포함되어 있습니다.

업데이트 : Android 개발을위한 .gitignore를 온라인에 넣었습니다 .


답변

GitHub의 github / gitignore 저장소에 android .gitignore 파일 이 있다는 것을 알고 있습니다. 이것은 안드로이드 개발에 매우 ​​일반적이어야하기 때문에 당신이 원하는 것일 수 있습니다.

언급 된 파일의 실제 내용 :

# 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

답변

내 Android 프로젝트에서 사용하는 것은 ADT와 Android Studio를 모두 지원하므로 팀과 함께 작업하는 것이 좋습니다.

# General Folders

# gradle/ comment this when using gradle wrapper.
build/
bin/
gen/
tmp/
# proguard/ comment if not using proguard.
.gradle/
.settings/
.idea/

# General Files

.project
.classpath
.DS_Store
local.properties
*.iml
# gradlew comment when using gradle wrapper
# gradlew.bat comment when using gradle wrapper
Thumbs.db


# files specific to current project
your_apk.apk

답변

간단히 github.gitignore 에서 Android 프로젝트 저장소를 생성 할 수 있습니다.

그리고 그 내용은 다음과 같습니다.

# Built application files
*.apk
*.ap_

# 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

답변

내 프로젝트 루트에는 .gitignore 파일이 있습니다. 다음을 포함합니다.

/bin/
/gen/