skylot/jadx · critical · JadxRuntimeException

{} not found in classpath

Error message

{} not found in classpath

What it means

Thrown by ManifestAttributes.loadXML(String) when ManifestAttributes.class.getResourceAsStream(xml) returns null, meaning the Android attribute definition XML file (attrs.xml or attrs_manifest.xml under /android/) is not on the classpath. These are bundled resource files shipped inside the jadx-core JAR. A null return means the JAR is incomplete, corrupted, or was assembled incorrectly (e.g., a custom shade/fat-jar build that excluded resources).

Source

Thrown at jadx-core/src/main/java/jadx/core/xmlgen/ManifestAttributes.java:89

	private final Map<String, MAttr> attrMap = new HashMap<>();
	private final Map<String, MAttr> appAttrMap = new HashMap<>();

	public ManifestAttributes(IJadxSecurity security) {
		this.security = security;
		parseAll();
	}

	private void parseAll() {
		parse(loadXML(ATTR_XML));
		parse(loadXML(MANIFEST_ATTR_XML));
		LOG.debug("Loaded android attributes count: {}", attrMap.size());
	}

	private Document loadXML(String xml) {
		Document doc;
		try (InputStream xmlStream = ManifestAttributes.class.getResourceAsStream(xml)) {
			if (xmlStream == null) {
				throw new JadxRuntimeException(xml + " not found in classpath");
			}
			doc = security.parseXml(xmlStream);
		} catch (Exception e) {
			throw new JadxRuntimeException("Xml load error, file: " + xml, e);
		}
		return doc;
	}

	private void parse(Document doc) {
		NodeList nodeList = doc.getChildNodes();
		for (int count = 0; count < nodeList.getLength(); count++) {
			Node node = nodeList.item(count);
			if (node.getNodeType() == Node.ELEMENT_NODE
					&& node.hasChildNodes()) {
				parseAttrList(node.getChildNodes());
			}
		}
	}

View on GitHub (pinned to e738a26571)

Solutions

  1. Verify the jadx-core JAR contains the resources: jar tf jadx-core.jar | grep 'android/attrs.xml'.
  2. Rebuild or re-download the jadx JAR from the official release.
  3. If building from source, ensure Maven/Gradle resource copying is enabled (src/main/resources included).
  4. If shading, configure the shade plugin to include resource files, not just classes.

Example fix

// build.gradle — ensure resources are included
// before (resources excluded)
sourceSets { main { resources { exclude '**/*.xml' } } }

// after (resources included)
sourceSets { main { resources { srcDirs = ['src/main/resources'] } } }
Defensive patterns

Strategy: validation

Validate before calling

public static boolean bundledAttrXmlPresent() {
    return ManifestAttributes.class.getResourceAsStream("/android/attrs.xml") != null
        && ManifestAttributes.class.getResourceAsStream("/android/attrs_manifest.xml") != null;
}

Try / catch

try {
    ManifestAttributes ma = new ManifestAttributes(security);
} catch (JadxRuntimeException e) {
    if (e.getMessage().contains("not found in classpath")) {
        System.err.println("jadx-core JAR is missing bundled resources. Re-download or rebuild.");
    }
    throw e;
}

Prevention

When it happens

Trigger: Loading ManifestAttributes when the jadx-core JAR is missing its bundled /android/attrs.xml or /android/attrs_manifest.xml resources. A custom build or shading step that stripped resource files. A corrupted JAR download. Running from an IDE classpath that excluded resources.

Common situations: A custom fat/uber JAR build that only included .class files and dropped resources. Maven/Gradle resource filtering or exclusion misconfiguration. An incomplete jadx installation. IDE resource directory misconfigured to not copy resources to the output.

Related errors


AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14). Data as JSON: /api/errors/1042843e1b45e43c. Report an issue: GitHub.