Androlib.buildPackage: deleting out.apk file before packaging.

It fixes bug related to bs command not working.
This commit is contained in:
Ryszard Wiśniewski 2010-03-24 11:09:41 +01:00
parent a1e9bbaa2b
commit 7a5223cda1

View File

@ -158,11 +158,16 @@ public class Androlib {
}
public void buildPackage() throws AndrolibException {
File distDir = new File("dist");
if (! distDir.exists()) {
distDir.mkdirs();
File outApk = new File("dist/out.apk");
if (outApk.exists()) {
outApk.delete();
} else {
File outDir = outApk.getParentFile();
if (! outDir.exists()) {
outDir.mkdirs();
}
}
mAndRes.aaptPackage(new File("dist/out.apk"), null, null,
mAndRes.aaptPackage(outApk, null, null,
new File("build/apk"), false);
}
}