使用github在Mac和Windows上开发单个Android应用程序

时间:2015-10-27 18:47:29

标签: android git android-studio github gradle

可以在两个操作系统上开发单个Android应用程序吗?

如果我使用Github,我想在Mac上在家中和Windows上使用Android Studio开发Android应用程序,我会遇到任何问题吗?

3 个答案:

答案 0 :(得分:2)

在同一个项目中使用不同的操作系统没有问题。

您必须配置正确的.gitignore文件,以避免使用包含本地路径和参考的文件。

这是一个例子:

#Android
gen/
build/
local.properties

# suggestion: also ignore libs/*.properties files for old eclipse project
# can't be added here because multiple libs/ directory can be around in different paths

# Idea or Android Studio
# According to this
# see http://intellij-support.jetbrains.com/entries/23393067 and http://devnet.jetbrains.com/docs/DOC-1186
# I shouldn't ignore most of this stuff.. but looking at the content I see environment stuffs in it.
*.iws
*.iml
*.ipr
.idea
.gradle/
out

# Eclipse
.project
.classpath
.settings
# Eclipse NDK
.cproject

# Mac
.DS_Store

# Generic
*~
.swp

答案 1 :(得分:1)

您需要确保所有特定于操作系统的元数据(例如.trashes)都在.gitignore中,但除此之外您应该没有问题。

答案 2 :(得分:0)

你需要使用一些git客户端,angleMode可能是版本控制的最佳选择。除此之外我不会有任何问题。