pxb1988/dex2jar · error · HelpException
no odex
Error message
no odex
What it means
Usage guard in DexWeaverCmd.doCommandLine: no positional odex file argument was given. DexWeaverCmd requires at least one odex input to weave, so running the command with zero remaining args aborts with this HelpException before any work starts.
Solutions
- Re-run d2j-dex-weaver supplying the required odex file path as a positional argument
- Run the command with -h/--help to see the full syntax and option list
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at dex-tools/src/main/java/com/googlecode/dex2jar/tools/DexWeaverCmd.java:44 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pxb1988/dex2jar@b5bda4fb49 (2026-09-08).
Data as JSON: /api/errors/1cf9b42371c1e7a9.
Report an issue: GitHub.
Appendix: source
Thrown at dex-tools/src/main/java/com/googlecode/dex2jar/tools/DexWeaverCmd.java:44
private Path config;
@Opt(opt = "s", longOpt = "stub-dex", description = "stub dex", argName = "stub")
private Path stub;
static Method parseMethod(String str) {
int i = str.indexOf('.');
String owner = str.substring(0, i);
int j = str.indexOf('(', i);
String name = str.substring(i + 1, j);
i = str.indexOf(')', j);
String args = str.substring(j + 1, i);
String ret = str.substring(i + 1);
return new Method(owner, name, Utils.toTypeList(args), ret);
}
@Override
protected void doCommandLine() throws Exception {
if (remainingArgs.length == 0) {
throw new HelpException("no odex");
}
final Map<String, Method> map = new HashMap<>();
for (String ln : Files.readAllLines(config, StandardCharsets.UTF_8)) {
if (ln.startsWith("#") || ln.length() == 0) {
continue;
}
String[] x = ln.split("=");
map.put(x[0], parseMethod(x[1]));
}
DexFileWriter out = new DexFileWriter();
DexFileVisitor fv = new DexFileVisitor(out) {
@Override
public DexClassVisitor visit(int access_flags, String className, String superClass, String[] interfaceNames) {
DexClassVisitor dcv = super.visit(access_flags, className, superClass, interfaceNames);
if (dcv != null) {
return new DexClassVisitor(dcv) {View on GitHub (pinned to b5bda4fb49)