mirror of
https://github.com/revanced/Apktool.git
synced 2025-02-01 14:47:56 +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 {
|
public void buildPackage() throws AndrolibException {
|
||||||
File distDir = new File("dist");
|
File outApk = new File("dist/out.apk");
|
||||||
if (! distDir.exists()) {
|
if (outApk.exists()) {
|
||||||
distDir.mkdirs();
|
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);
|
new File("build/apk"), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user