Ant的具体使用这里就不详细说明了,这里记录下自己使用Ant批量打包apk的时候遇到的问题。
1. build 出现 crunch等字样的错误
<span style="color: #FF0000;">[aapt] invalid resource directory name: F:workspacelibin es/crunch</span>
BUILD FAILED
D:Androidsdk oolsantuild.xml:601: The following error occurred while executing this line:
D:Androidsdk oolsantuild.xml:653: The following error occurred while executing this line:
D:Androidsdk oolsantuild.xml:698: null returned: 1
在build.xml中增加property,忽略处理不需要的目录和文件, 可以加到AndroidSDK oolsantuild.xml (对android所有项目生效)
也可以添加到项目的build.xml中(这样子就只对自己的项目生效!)
<property
name="aapt.ignore.assets"
value="x3Cdirx3Ecrunch:!.svn:!.git:.*:x3Cdirx3E_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~" />
2.