使用构建标签修改 AndroidManifest.xml 会导致 Eclipse 中无限重建
我在我的 Android 构建系统中添加了一个标记/日期标记系统,类似于 Stack Overflow 上找到的线程:在 android APK 中嵌入版本详细信息
这对我来说非常有用,这篇文章很棒,我只是修改了 Perl 以放入日期戳,如下所示:
perl -npi -e 's/(Build Date:)(.+)(DEV-MOB)/"Build Date: " . localtime() . " DEV-MOB"/e;' $MANIFEST
我现在处理的问题是Eclipse 希望继续一遍又一遍地构建。一旦它发现 AndroidManifest.xml 发生了变化,它就会启动另一个自动构建,从而更改 AndroidManifest.xml 并引发另一个自动构建......冲洗,起泡,重复。
我已经关闭了“自动构建”,结果对我来说很好(即仅在调试部署和/或清理后构建),而不是像 Eclipse 那样在每个文件保存和/或更改上构建。同事希望 Autobuild 能够正常运行,并说我的日期标记有缺陷。
修改 AndroidManifest.xml 后,如何让“Builder”将树标记为刷新和/或最新,以便树不会继续循环?看起来“刷新”的标志被评估并在上一个构建之后触发新的构建。
谢谢,如果需要,我可以发布有关日期标记的更多详细信息。
DD
I've added a tagging / date-stamping system to my Android build system similar to the thread found here on Stack Overflow: embed version details in android APK
This worked out great for me, The post was awesome and I simply modified the Perl to put in a datestamp like thus:
perl -npi -e 's/(Build Date:)(.+)(DEV-MOB)/"Build Date: " . localtime() . " DEV-MOB"/e;' $MANIFEST
The issue I'm dealing with now is that Eclipse wants to continue building over and over. As soon as it sees that the AndroidManifest.xml has changed, it starts another autobuild, thereby changing the AndroidManifest.xml and sparking another autobuild... Rinse, lather, repeat.
I've turned off the "Build Automatically," and the result are fine for me (i.e. only build on a debugging deployment and/or after a clean), not on every single file save and/or change as Eclipse is want to do. Co-worker wants the Autobuild functioning as normal, and says my date stamping is defective otherwise.
How do I get the "Builder" to mark the tree as refreshed and/or up-to-date after modifying the AndroidManifest.xml, so that the tree doesn't keep looping? Looks like the flag that says "refreshed" is evaluated and triggers a new build after the previous build.
Thanks, I can post more details on the date stamping if desired.
DD
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查您的构建器是否在项目构建器列表顺序中排在第一位。
Check that your builder comes first in the Project builders list order.