{"record":{"id":"44449aa23fce48bd","repo":"shwenzhang/AndResGuard","slug":"can-not-found-the-unsign-apk-file-path-s","errorCode":null,"errorMessage":"can not found the unsign apk file path=%s","messagePattern":"can not found the unsign apk file path=(.+?)","errorType":"exception","errorClass":"java.io.IOException","httpStatus":null,"severity":"error","filePath":"AndResGuard-core/src/main/java/com/tencent/mm/androlib/ResourceApkBuilder.java","lineNumber":358,"sourceCode":"          destResDir.getAbsolutePath()\n      ));\n    }\n    if (!destResDir.exists()) {\n      System.err.printf(\"Missing res files, path=%s\\n\", destResDir.getAbsolutePath());\n      System.exit(-1);\n    }\n    //这个需要检查混淆前混淆后，两个res的文件数量是否相等\n    collectFiles.add(destResDir);\n    File rawARSCFile = new File(mOutDir.getAbsolutePath() + File.separator + \"resources.arsc\");\n    if (!rawARSCFile.exists()) {\n      System.err.printf(\"Missing resources.arsc files, path=%s\\n\", rawARSCFile.getAbsolutePath());\n      System.exit(-1);\n    }\n    collectFiles.add(rawARSCFile);\n    FileOperation.zipFiles(collectFiles, tempOutDir, mUnSignedApk, compressData);\n\n    if (!mUnSignedApk.exists()) {\n      throw new IOException(String.format(\"can not found the unsign apk file path=%s\", mUnSignedApk.getAbsolutePath()));\n    }\n  }\n\n  private void addNonSignatureFiles(List<File> collectFiles, File metaFolder) {\n    File[] metaFiles = metaFolder.listFiles();\n    if (metaFiles != null) {\n      for (File metaFile : metaFiles) {\n        String metaFileName = metaFile.getName();\n        // Ignore signature files\n        if (!metaFileName.endsWith(\".MF\") && !metaFileName.endsWith(\".RSA\") && !metaFileName.endsWith(\".SF\")) {\n          System.out.println(String.format(\"add meta file %s\", metaFile.getAbsolutePath()));\n          collectFiles.add(metaFile);\n        }\n      }\n    }\n  }\n\n  private void addStoredFileIn7Zip(ArrayList<String> storedFiles, File outSevenZipAPK)","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/shwenzhang/AndResGuard/blob/e4df245d82f27d9a2d0dd108260a3510cbaba849/AndResGuard-core/src/main/java/com/tencent/mm/androlib/ResourceApkBuilder.java#L340-L376","documentation":"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.","triggerScenarios":"Thrown at AndResGuard-core/src/main/java/com/tencent/mm/androlib/ResourceApkBuilder.java:358 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4df245d82f27d9a2d0dd108260a3510cbaba849","analyzedAt":"2026-09-12T17:49:07.798Z","contentChangedAt":"2026-09-12T17:49:07.798Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}