根据“帮助”目标文档:
- 调试:构建应用程序和 用调试 key 对其签名
- 发布;构建应用程序: 生成的 APK 文件必须签名 在发布之前
这是我发现的,与我预期的有点不同:
调试:忽略 build.properties
中的 keystore 定义,无论您是否指定它们。它使用哪个 kesystore 文件?与 Eclipse 相同:Documents and Settings 中的默认 debug.keystore
文件?
它创建了两个文件:
- -debug-unaligned.apk(已签名,未对齐)
- -debug.apk(签名、对齐)
release: 'help' 说它没有签名。它创建这些文件:
- -unsigned.apk(未签名,未对齐)
只有在 build.properties
中指定值时,接下来的两个才有效:
- -unaligned.apk(已签名,未对齐)
- -release.apk(签名、对齐)
任何有帮助的评论/验证将不胜感激。
最佳答案
Which kesystore file is it using? The same as Eclipse: the default debug.keystore file in your Documents and Settings?
是的。
关于安卓 Ant 构建 : debug and release targets,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6312109/