skylot/jadx · error · JadxRuntimeException
No end types in class hierarchy: {}
Error message
No end types in class hierarchy: {} What it means
Thrown during override-method analysis when collecting supertypes of a class. The visitor traverses the class hierarchy gathering both supertypes and 'end types' (terminal leaves of the hierarchy graph, e.g., java.lang.Object or unknown external classes). If at least one supertype was collected but zero end types were identified, the hierarchy graph is malformed or circular in a way that prevents resolving method overrides.
Source
Thrown at jadx-core/src/main/java/jadx/core/dex/visitors/OverrideMethodVisitor.java:292
public List<ArgType> getSuperTypes() {
return superTypes;
}
public Set<String> getEndTypes() {
return endTypes;
}
}
@Nullable
private SuperTypesData collectSuperTypes(ClassNode cls) {
Set<ArgType> superTypes = new LinkedHashSet<>();
Set<String> endTypes = new HashSet<>();
collectSuperTypes(cls, superTypes, endTypes);
if (superTypes.isEmpty()) {
return null;
}
if (endTypes.isEmpty()) {
throw new JadxRuntimeException("No end types in class hierarchy: " + cls);
}
return new SuperTypesData(new ArrayList<>(superTypes), endTypes);
}
private void collectSuperTypes(ClassNode cls, Set<ArgType> superTypes, Set<String> endTypes) {
RootNode root = cls.root();
int k = 0;
ArgType superClass = cls.getSuperClass();
if (superClass != null) {
k += addSuperType(root, superTypes, endTypes, superClass);
}
for (ArgType iface : cls.getInterfaces()) {
k += addSuperType(root, superTypes, endTypes, iface);
}
if (k == 0) {
endTypes.add(cls.getType().getObject());
}
}View on GitHub (pinned to e738a26571)
Solutions
- Ensure all referenced superclass/interface DEX files are included in the input set so jadx can resolve them
- Update jadx to the latest version — class hierarchy analysis is actively improved
- Report the APK with the failing class name as a jadx GitHub issue for a fix
- As a workaround, mark the problem class with DONT_GENERATE via a custom pass or exclude it from input
Defensive patterns
Strategy: try-catch
Validate before calling
// Before batch decompilation, verify all input DEX files are present
File[] inputFiles = new File(apkDir).listFiles((d, f) -> f.endsWith(".dex"));
if (inputFiles == null || inputFiles.length == 0) {
throw new IllegalArgumentException("No DEX files found in input");
}
// Load with all classpath dependencies to maximize hierarchy resolution
JadxArgs args = new JadxArgs();
args.setInputFiles(Arrays.asList(inputFiles)); Try / catch
try {
jadxDecompiler.load();
jadxDecompiler.save();
} catch (JadxRuntimeException e) {
if (e.getMessage().contains("No end types in class hierarchy")) {
LOG.warn("Class hierarchy issue in input, skipping full decompile: {}", e.getMessage());
// Retry with per-class decompilation to isolate the problem
} else {
throw e;
}
} Prevention
- Include all DEX files from multidex APKs as input together
- Provide the jadx classpath JAR (android.jar) to resolve external class hierarchies
- Keep jadx updated to benefit from hierarchy analysis improvements
- Use per-class decompilation (decompileClass) instead of batch save to isolate failures
When it happens
Trigger: collectSuperTypes found non-empty superTypes but empty endTypes. This happens when every supertype encountered was already in the superTypes set (via addSuperType's loop detection returning 0) before any terminal end type was recorded, or when resolved ClassNodes form a cycle that exhausts before reaching a leaf.
Common situations: Obfuscated APKs with intentionally circular class hierarchies crafted by tools that rewrite superclass references; partial DEX inputs where referenced superclass definitions are missing from both the input and the jadx classpath (clsp); class hierarchies that reference themselves as a superclass.
Related errors
- Bad name for type variable: {}
- Can't parse type: {}, unexpected: {}
- No inner type found: {}
- Unexpected inner type found: {}
- Failed to parse generic types map
AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14).
Data as JSON: /api/errors/a4983a9df0fb295b.
Report an issue: GitHub.