使用ApkFile方式解析,执行完毕调用apkFile.close(),文件无法被解除占用。
tangxianlai opened this issue · 0 comments
tangxianlai commented
List<ApkV2Signer> v2signers = apkFile.getApkV2Singers(); // apk v2 signers
apkFile.close();
FileOutputStream outputStream = new FileOutputStream(file);
getApkV2Singers() 会导致文件一直被占用
java.io.FileNotFoundException: D:\temp\appPackage\app_doctorOnLine_1000_V1.0.0_201904261552.apk (请求的操作无法在使用用户映射区域打开的文件上执行。)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:162)