mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-20 16:57:34 +01:00
Androlib.buildPackage: deleting out.apk file before packaging.
It fixes bug related to bs command not working.
This commit is contained in:
parent
a1e9bbaa2b
commit
7a5223cda1
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user