您是否应该将 R.java 文件签入到 VCS 中?
非常基本的问题。我计划通过 Hudson 进行构建,并在那里提供 Android apk 文件可供下载。 /gen 目录中的 R.java 是您通过 VCS 签入的内容吗?或者它是需要被忽略的东西,如果它不存在,android sdk每次都会生成?
Very basic question. I plan to do our builds via Hudson and have android apk files available for download there. Is R.java in the /gen directory something that you check-in with you VCS? Or is it something that needs to be ignored and android sdk will generate every time if it doesn't exist?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
整个
gen
文件夹是自动生成的,不应检入 VCS。The entire
gen
folder is automatically generated and shouldn't be checked into VCS.gen 中的任何内容都不应该进入您的存储库。
将 gen 添加到 .gitignore 以避免错误/混乱的 git 状态。
Nothing in gen should go into your repository.
Add gen to your .gitignore to avoid mistakes/cluttered git status.
不,您不必包含任何 gen/ 文件。您必须排除 gen 目录本身,否则在更新/提交到 git 或任何其他 VCS 时可能会遇到问题。
No, you don't have to include any of the gen/ files. You must exclude the gen directory itself, otherwise you could ran into problems when updating/committing to git or any other VCS.
您需要忽略该文件。 Ant 构建任务创建此文件。
You need to ignore this file. Ant build task create this file.