在版本控制中存储Android eclipse项目?
好的,所以我在一个目录(本质上是工作区)中有一个 android 项目和一些相关的 java 项目。我已将它们全部添加到 git 中。我的 .gitignore 如下:
# OS Files
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
#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
#Java
*.class
# Eclipse
*.pydevproject
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
# libgdx specific
*/libs/*
现在,当我尝试在另一台机器上检查它并将 eclipse 项目导入到 git 时,我遇到了问题。基本的java项目工作正常,但android项目抱怨无法找到gen文件夹,如果我尝试进行清理,它会抱怨该项目没有default.properties文件。如果我自己创建 gen 文件,它仍然会抱怨 default.properties 文件,并抱怨它无法解析 java.lang.Object (!?)。不知道这里发生了什么。我猜想我应该签入源代码管理的东西没有被签入,但我不太确定是什么。有什么想法吗?
Ok, so I have an android project and a few related java projects in a directory (the workspace, essentially). I've added all of them to git. My .gitignore is as follows:
# OS Files
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
#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
#Java
*.class
# Eclipse
*.pydevproject
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
# libgdx specific
*/libs/*
Now, when I try to check this out on another machine and import the eclipse projects into git there, I run into problems. The basic java projects work fine, but the android project complains about not being able to find the gen folder and if I try to do a clean, it complains that the project has no default.properties file. If I create the gen file myself, it still complains about the default.properties file, as well as complaining that it cant resolve java.lang.Object (!?). Not sure what's going on here. I'm guessing that something I should be checking in to source control isn't getting checked in, but I'm not really sure what. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里遇到的问题是由于在错误的时间执行此操作而导致 Android SDK/ADT 版本不同。当我将所有内容更新为相同版本后,一切都很好。
The problem I was running into here was a result of having differing versions of the Android SDK/ADT as a result of doing this at just the wrong time. After I updated everything to be the same version, it all worked great.