shwenzhang/AndResGuard · error · java.io.IOException
can not found the unsign apk file path=
Error message
can not found the unsign apk file path=%s
What it means
Thrown by ResourceApkBuilder.generalUnsignApk when packaging the unsigned APK: the unsigned APK file expected in the output directory (built by zipping destResDir, resources.arsc, etc.) is absent, so the subsequent signing step has nothing to sign. Usually indicates the zip step failed silently or the output directory was cleaned/changed between steps.
Solutions
- Ensure the unsigned apk was generated by the preceding generalUnsignApk steps; if the zip step failed or output went to a different path, fix the output directory configuration
- Check disk space and permissions on the output directory so the unsigned apk can be written
- Re-run the build from the resource processing step to regenerate the missing apk
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at AndResGuard-core/src/main/java/com/tencent/mm/androlib/ResourceApkBuilder.java:358 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of shwenzhang/AndResGuard@e4df245d82 (2026-09-12).
Data as JSON: /api/errors/44449aa23fce48bd.
Report an issue: GitHub.
Appendix: source
Thrown at AndResGuard-core/src/main/java/com/tencent/mm/androlib/ResourceApkBuilder.java:358
destResDir.getAbsolutePath()
));
}
if (!destResDir.exists()) {
System.err.printf("Missing res files, path=%s\n", destResDir.getAbsolutePath());
System.exit(-1);
}
//这个需要检查混淆前混淆后,两个res的文件数量是否相等
collectFiles.add(destResDir);
File rawARSCFile = new File(mOutDir.getAbsolutePath() + File.separator + "resources.arsc");
if (!rawARSCFile.exists()) {
System.err.printf("Missing resources.arsc files, path=%s\n", rawARSCFile.getAbsolutePath());
System.exit(-1);
}
collectFiles.add(rawARSCFile);
FileOperation.zipFiles(collectFiles, tempOutDir, mUnSignedApk, compressData);
if (!mUnSignedApk.exists()) {
throw new IOException(String.format("can not found the unsign apk file path=%s", mUnSignedApk.getAbsolutePath()));
}
}
private void addNonSignatureFiles(List<File> collectFiles, File metaFolder) {
File[] metaFiles = metaFolder.listFiles();
if (metaFiles != null) {
for (File metaFile : metaFiles) {
String metaFileName = metaFile.getName();
// Ignore signature files
if (!metaFileName.endsWith(".MF") && !metaFileName.endsWith(".RSA") && !metaFileName.endsWith(".SF")) {
System.out.println(String.format("add meta file %s", metaFile.getAbsolutePath()));
collectFiles.add(metaFile);
}
}
}
}
private void addStoredFileIn7Zip(ArrayList<String> storedFiles, File outSevenZipAPK)View on GitHub (pinned to e4df245d82)