skylot/jadx · error · JadxRuntimeException
Can't build insn arg from encoded value: {}
Error message
Can't build insn arg from encoded value: {} What it means
In CustomStringConcat.buildInsnArgFromEncodedValue(), the converted constant value is not null, not a LiteralArg, not an ArgType, and not a String. The StringConcatFactory recipe constant cannot be turned into an instruction argument because its type is unrecognized.
Source
Thrown at jadx-core/src/main/java/jadx/core/dex/instructions/invokedynamic/CustomStringConcat.java:115
concat.addArg(InsnArg.wrapArg(new ConstStringNode(sb.toString())));
}
}
private static InsnArg buildInsnArgFromEncodedValue(EncodedValue encodedValue) {
Object value = EncodedValueUtils.convertToConstValue(encodedValue);
if (value == null) {
return InsnArg.lit(0, ArgType.UNKNOWN);
}
if (value instanceof LiteralArg) {
return ((LiteralArg) value);
}
if (value instanceof ArgType) {
return InsnArg.wrapArg(new ConstClassNode((ArgType) value));
}
if (value instanceof String) {
return InsnArg.wrapArg(new ConstStringNode(((String) value)));
}
throw new JadxRuntimeException("Can't build insn arg from encoded value: " + encodedValue);
}
}
View on GitHub (pinned to e738a26571)
Solutions
- Upgrade JADX.
- Inspect the StringConcatFactory recipe and its constant values with baksmali.
- Use --show-bad-code to continue past the failing site.
- Report the encoded value type upstream.
Defensive patterns
Strategy: try-catch
Type guard
// Narrow the converted value to the supported set before building an arg. Object v = EncodedValueUtils.convertToConstValue(encodedValue); boolean buildable = v == null || v instanceof LiteralArg || v instanceof ArgType || v instanceof String;
Try / catch
try {
jadx.load();
} catch (JadxRuntimeException e) {
if (e.getMessage().contains("Can't build insn arg from encoded value")) {
log.warn("Unsupported constant in StringConcatFactory recipe", e);
} else throw e;
} Prevention
- Inspect makeConcatWithConstants recipe constants with baksmali.
- Use --show-bad-code to continue past unsupported concat constants.
- Keep JADX updated.
When it happens
Trigger: A StringConcatFactory bootstrap call whose recipe constant value (beyond index 3) is an unexpected EncodedValue type — e.g. an enum, array, annotation, or byte/short value that EncodedValueUtils.convertToConstValue returns as an unsupported object.
Common situations: Non-standard string concatenation recipes, obfuscated or packed makeConcatWithConstants sites, or a DEX produced by a toolchain with unusual encoded constants.
Related errors
- Failed to get call site for insn: {}
- 'invoke-custom' instruction processing error: {}
- Unsupported type for raw invoke-custom: {}
- Failed to generate 'invoke-custom' instruction:
- Unexpected argument type in lambda call:
AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14).
Data as JSON: /api/errors/daf05c6eb095e64a.
Report an issue: GitHub.