无法提交的Andr​​oid"根"文件夹的Git [英] Cannot commit android "gen" folder to Git

查看:139
本文介绍了无法提交的Andr​​oid"根"文件夹的Git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用例如: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.

这篇关于无法提交的Andr​​oid"根"文件夹的Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆