简体   繁体   English

Android如何使用ant脚本创建apk文件

[英]Android how to create apk file using ant script

有人告诉我,用ant脚本构建apk

Check the android developers documentation in the Building and Running from the Command Line topic. 从命令行主题中查看构建和运行中的android开发人员文档。 Assumed you created your project with the android tool it should be: 假设您使用android工具创建了项目,它应该是:

ant release

The documentation also describes the "eclipse with ADT" way 该文档还描述了“使用ADT进行日食”的方式

If you first set up the project with eclipse than try to create a new temp project with the android create project command line command and take the build.xml (and build.properties + local.properties ) from the new project for your existing one. 如果您首先使用eclipse设置项目,请尝试使用android create project命令行命令创建新的临时项目,并从现有项目的新项目中获取build.xml (和build.properties + local.properties )。

http://androidyou.blogspot.com/2012/12/android-project-ant-build-and-put.html http://androidyou.blogspot.com/2012/12/android-project-ant-build-and-put.html

add one target to get the version, using the regular expression to extract it from the manifest.xml 添加一个目标以获取版本,使用正则表达式从manifest.xml中提取它

then add this as a dependency to the release target 然后将此作为依赖项添加到发布目标

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM