{"record":{"id":"329b785b556d9c2f","repo":"skylot/jadx","slug":"androidmanifest-xml-is-missing","errorCode":null,"errorMessage":"AndroidManifest.xml is missing","messagePattern":"AndroidManifest\\.xml is missing","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/utils/android/AndroidManifestParser.java","lineNumber":55,"sourceCode":"\n\t\tthis.androidManifest = parseAndroidManifest(androidManifestRes);\n\t\tthis.appStrings = parseAppStrings(appStrings);\n\t}\n\n\tpublic boolean isManifestFound() {\n\t\treturn androidManifest != null;\n\t}\n\n\tpublic static @Nullable ResourceFile getAndroidManifest(List<ResourceFile> resources) {\n\t\treturn resources.stream()\n\t\t\t\t.filter(resourceFile -> resourceFile.getType() == ResourceType.MANIFEST)\n\t\t\t\t.findFirst()\n\t\t\t\t.orElse(null);\n\t}\n\n\tpublic ApplicationParams parse() {\n\t\tif (!isManifestFound()) {\n\t\t\tthrow new JadxRuntimeException(\"AndroidManifest.xml is missing\");\n\t\t}\n\t\treturn parseAttributes();\n\t}\n\n\tprivate ApplicationParams parseAttributes() {\n\t\tApplicationParams appParams = new ApplicationParams();\n\n\t\t@Nullable\n\t\tElement manifest = (Element) androidManifest.getElementsByTagName(\"manifest\").item(0);\n\t\t@Nullable\n\t\tElement usesSdk = (Element) androidManifest.getElementsByTagName(\"uses-sdk\").item(0);\n\n\t\tif (parseAttrs.contains(AppAttribute.APPLICATION_LABEL)) {\n\t\t\tappParams.setApplicationLabel(getApplicationLabel());\n\t\t}\n\t\tif (usesSdk != null) {\n\t\t\tif (parseAttrs.contains(AppAttribute.MIN_SDK_VERSION)) {\n\t\t\t\tappParams.setMinSdkVersion(safeParseInteger(usesSdk.getAttribute(\"android:minSdkVersion\")));","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/utils/android/AndroidManifestParser.java#L37-L73","documentation":"AndroidManifestParser.parse() throws when isManifestFound() is false, i.e. the parser was constructed without locating an AndroidManifest resource (androidManifest document is null). The parser is built from a ResourceFile of type MANIFEST; if none was provided/found, parseAttributes() cannot run. This signals the APK/resource set has no decodable manifest.","triggerScenarios":"Constructing AndroidManifestParser with a ResourceFile that is not the manifest (or null) then calling parse(); or getAndroidManifest(resources) returned null because no resource has ResourceType.MANIFEST.","commonSituations":"Decompiling a JAR/non-APK input that has no AndroidManifest.xml; a stripped/obfuscated APK with the manifest removed or renamed; passing the wrong ResourceFile list; a manifest resource present but not tagged as ResourceType.MANIFEST by the resource loader.","solutions":["Confirm the input is an APK/AAB that actually contains AndroidManifest.xml.","Call AndroidManifestParser.getAndroidManifest(resources) first and only parse() when it returns non-null.","Re-export/rebuild the APK if the manifest was stripped.","If using the API directly, ensure you pass the manifest ResourceFile returned by the resource loader, not an arbitrary one."],"exampleFix":"// before\nAndroidManifestParser p = new AndroidManifestParser(manifestRes, attrs, security);\nApplicationParams params = p.parse(); // throws if manifest missing\n// after\nResourceFile mf = AndroidManifestParser.getAndroidManifest(resources);\nif (mf == null) {\n    LOG.warn(\"No AndroidManifest.xml in input\");\n} else {\n    ApplicationParams params = new AndroidManifestParser(mf, attrs, security).parse();\n}","handlingStrategy":"validation","validationCode":"ResourceFile mf = AndroidManifestParser.getAndroidManifest(resources);\nif (mf == null) {\n    // no manifest in this input; do not call parse()\n    LOG.warn(\"Input has no AndroidManifest.xml\");\n} else {\n    new AndroidManifestParser(mf, attrs, security).parse();\n}","typeGuard":null,"tryCatchPattern":"try {\n    params = parser.parse();\n} catch (JadxRuntimeException e) {\n    if (\"AndroidManifest.xml is missing\".equals(e.getMessage())) {\n        LOG.warn(\"No manifest; skipping app params\");\n        params = ApplicationParams.empty();\n    } else {\n        throw e;\n    }\n}","preventionTips":["Always resolve the manifest ResourceFile via getAndroidManifest() before parsing.","Confirm the input is an APK/AAB that bundles AndroidManifest.xml.","Guard non-Android inputs (plain JARs) before constructing the parser.","Treat a missing manifest on a real APK as a sign of stripping/obfuscation."],"tags":["jadx","android","manifest","resources"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}