任何人告诉我,使用ant脚本构建apk
答案 0 :(得分:13)
检查Building and Running from the Command Line主题中的android开发者文档。假设您使用android
工具创建了项目,它应该是:
ant release
该文档还描述了“使用ADT进行日食”的方式
如果您首先使用eclipse设置项目,而不是尝试使用android create project命令行命令创建新的临时项目并执行build.xml
(和build.properties
+ {{1}来自现有项目的新项目。
答案 1 :(得分:1)
http://androidyou.blogspot.com/2012/12/android-project-ant-build-and-put.html
添加一个目标来获取版本,使用正则表达式从manifest.xml中提取它
然后将此作为依赖项添加到发布目标