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
- Verify the jadx-core JAR contains the resources: jar tf jadx-core.jar | grep 'android/attrs.xml'.
- Rebuild or re-download the jadx JAR from the official release.
- If building from source, ensure Maven/Gradle resource copying is enabled (src/main/resources included).
- 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
- Verify the jadx-core JAR includes bundled XML resources after building or shading.
- Use official releases rather than custom builds unless resource inclusion is verified.
- In Maven/Gradle, ensure src/main/resources is on the classpath.
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
- Failed to load android resource file (res-map.txt)
- Failed to load top level domain list file: tlds.txt
- Xml load error, file: {}
- Can't load classpath file:
- Resource not found: {}
AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14).
Data as JSON: /api/errors/1042843e1b45e43c.
Report an issue: GitHub.