无法提交的Andr​​oid"根"文件夹的Git文件夹、oid、Andr、Git

2023-09-07 22:05:18 作者:ぞ滚出我的世界

我使用例如:It在Eclipse提供的Andr​​oid项目我工作的Git的支持。问题是,我的承诺项目到本地仓库后,我认识到了根文件夹中没有得到承诺。由于这个原因,当我尝试从Git仓库获得最新的源代码我不断收到以下错误后打开该项目另一台机器上:

I am using EGit in eclipse to provide Git support for an Android project I am working on. The problem is that after committing my project to the local repository I realized that the "gen" folder was not getting committed. As a result of this when I try to open the project on another machine after getting the latest source from the Git repository I keep getting the following error:

错误:无法打开类文件D:\\ codeREP \\的POC \\的Java \\ Android的\\独\\根\\组织\\等等\\例子\\ R.java:没有这样的文件或目录

ERROR: Unable to open class file D:\CodeRep\POCs\Java\Android\Sudoku\gen\org\blah\example\R.java: No such file or directory

为什么我不能犯Eclipse中的根文件夹的Git?一切都被提交就好了,所以我可以把它推到远程存储库中。

Why can't I commit the "gen" folder to Git from Eclipse ? Everything gets committed just fine so I can push it to the remote repository.

推荐答案

您不应该commiting的文件夹;它包含生成code和源代码控制不属于。你应该重新创建你拉源$ C ​​$ C与任何一个Eclipse在机器上项目 - >清除或命令行蚂蚁干净如果你'重新使用构建脚本。

You shouldn't be commiting the gen folder; it contains generated code and doesn't belong in source control. You should be recreating it on the machine you pull the source code on with either an Eclipse "Project -> Clean" or a command line "ant clean" if you're using the build scripts.