Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/390.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Android应用程序的典型.gitignore文件_Java_Android_Eclipse_Git_Gitignore - Fatal编程技术网

Java Android应用程序的典型.gitignore文件

Java Android应用程序的典型.gitignore文件,java,android,eclipse,git,gitignore,Java,Android,Eclipse,Git,Gitignore,只需通过命令行(mac终端)将Android项目置于git(beanstalk)版本控制之下。下一步是设置排除 对于那些已经走上这条道路的人: android项目的典型.gitignore文件应该是什么样子? 在Eclipse中设置的项目在我的项目根目录中有一个文件.gitignore。它包括: /bin/ /gen/ 我知道github上的github/gitignore存储库有一个文件。这可能是您想要的,因为它对于android开发应该是非常通用的 上述文件的实际内容: # built a

只需通过命令行(mac终端)将Android项目置于git(beanstalk)版本控制之下。下一步是设置排除

对于那些已经走上这条道路的人:

android项目的典型.gitignore文件应该是什么样子?


在Eclipse中设置的项目在我的项目根目录中有一个文件.gitignore。它包括:

/bin/
/gen/

我知道github上的github/gitignore存储库有一个文件。这可能是您想要的,因为它对于android开发应该是非常通用的

上述文件的实际内容:

# 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

这是我的标准安卓
.gitignore
.hgignore
文件。它通常工作得很好

bin
gen
target
.settings
.classpath
.project
*.keystore
*.swp
*.orig
*.log
*.properties
seed.txt
map.txt
它包含eclipse、vim.swp文件、mavens目标文件夹和proguard映射文件

更新:我已经把我的。

你可以混合:

与:


除了其他人的建议之外,我还想添加
proguard
文件夹,以防您使用它。您可以忽略整个文件夹,也可以只忽略
dump.txt
seeds.txt
usage.txt
。基本上,保持
mapping.txt
版本化是一个好主意,这样您就可以调试来自用户的模糊堆栈跟踪。更多详细信息。

此外,如果您使用IDEA的IntelliJ并构建工件(您应该),那么您可能需要添加:

out/
(这是默认情况下构建工件的地方)

如果你不想分享你的IntelliJ项目,那就忽略它

.idea/

这是我在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
只需为Android项目存储库生成
.gitignore

其内容如下

# 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

我不知道github的gitignore存储库,这是一个非常有用的提示,谢谢。你真的想忽略。类路径?这在你的git存储库中似乎是一件相当重要的事情。有趣的是,自从你发表评论后,它看起来已经被改变了,Chris。谢谢你的提醒!更新的文件在他发布的链接中。除了.classpath之外,您不想忽略的另一个文件是.project。为什么密钥库文件在那里?如果它在该文件夹中,请不要提交它。是的,但为什么``
# 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
# 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