{"record":{"id":"236119505adf97df","repo":"Tencent/matrix","slug":"tag-no-resource-directory-found","errorCode":null,"errorMessage":"TAG + \"---No resource directory found!\"","messagePattern":"TAG \\+ \"---No resource directory found!\"","errorType":"exception","errorClass":"TaskExecuteException","httpStatus":null,"severity":"error","filePath":"matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/ResProguardCheckTask.java","lineNumber":97,"sourceCode":"            long startTime = System.currentTimeMillis();\n            if (resDir.exists() && resDir.isDirectory()) {\n                Log.i(TAG, \"find resource directory \" + resDir.getAbsolutePath());\n                ((TaskJsonResult) taskResult).add(\"hasResProguard\", true);\n            } else {\n                resDir = new File(inputFile, ApkConstants.RESOURCE_DIR_NAME);\n                if (resDir.exists() && resDir.isDirectory()) {\n                    File[] dirs = resDir.listFiles();\n                    boolean hasProguard = true;\n                    for (File dir : dirs) {\n                        if (dir.isDirectory() && !fileNamePattern.matcher(dir.getName()).matches()) {\n                            hasProguard = false;\n                            Log.i(TAG, \"directory \" + dir.getName() + \" has a non-proguard name!\");\n                            break;\n                        }\n                    }\n                    ((TaskJsonResult) taskResult).add(\"hasResProguard\", hasProguard);\n                } else {\n                    throw new TaskExecuteException(TAG + \"---No resource directory found!\");\n                }\n            }\n            taskResult.setStartTime(startTime);\n            taskResult.setEndTime(System.currentTimeMillis());\n            return taskResult;\n        } catch (Exception e) {\n            throw new TaskExecuteException(e.getMessage(), e);\n        }\n    }\n}\n","sourceCodeStart":79,"sourceCodeEnd":108,"githubUrl":"https://github.com/Tencent/matrix/blob/3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7/matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/ResProguardCheckTask.java#L79-L108","documentation":"Raised in ResProguardCheckTask.call() when neither the expected resource directory layout is found in the unzipped APK: the task looks for res/ (or the resource dir constant) and neither candidate exists or is a directory. This means the input is not a validly extracted APK or the APK lacks a resource directory, so the resguard check cannot proceed and the task throws a TaskExecuteException.","triggerScenarios":"Thrown at matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/ResProguardCheckTask.java:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the APK was built with expected resource structure; the task looks for the res/ directory (RESOURCE_DIR_NAME)","Check the input directory is a correctly unzipped APK root","Skip this check if resource-proguard detection is not applicable to the input"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7","analyzedAt":"2026-09-08T08:01:39.722Z","contentChangedAt":"2026-09-08T08:01:39.722Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}