首先,我参照的文章是
http://hi.baidu.com/gaogaf/item/f61c6f4323a72e96823ae17a
,
具体内容我就不粘贴了,我说下我遇到的几个问题,
1) android update之后不生成ant.propertity
这个如果需要签名的话,要自己添加一个,加入你的签名文件相关的东西
我的文件是这样写的
<!----
key.store=test.test
key.alias=test
key.store.password=testtest
key.alias.password=testtest
--->
签名文件需要放在build.xml同一文件夹下,否则会出现singlepath问题
2) 如果需要混淆文件
需要打开project.property的混淆开关
<!---- 我的文件是这样的 ----
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=proguard-project.txt
# Project target.
target=android-8
-------->
3) 修改 build.xml
<project name="projectname" default="release">
我上一篇文章:
http://blog.csdn.net/buaiweihua/article/details/8591383
实现了自己使用ant打包,建议大家看下,了解下ant打包原理