pxb1988/dex2jar · error · RuntimeException

not support

Error message

not support

What it means

Generic guard in JumpOp.write: while serializing a jump/payload instruction, the instruction's format code fell into a case with no writer (only the kFmt10t..kFmt31t / 22t branches shown are handled). It means the opcode-format combination being written is not supported by this code writer — an internal dex-writer limitation rather than a user argument error.

Solutions

  1. Use an opcode/format combination supported by JumpOp (e.g. standard if-* / goto formats)
  2. Choose the appropriate specialized op class (GotoOp etc.) for formats like 21t/31t handled elsewhere
  3. Add the missing kFmt case to write() if you control the source

Example fix

// before
new JumpOp(Op.GOTO_32, a, offset, label);
// after
new JumpOp(Op.GOTO, a, offset, label); // or the class handling 31t
Defensive patterns

Strategy: validation

Validate before calling

switch (op) { case GOTO: case IF_EQ: case IF_NE: case IF_LT: case IF_GE: case IF_GT: case IF_LE: /* supported */ break; default: throw new IllegalArgumentException("unsupported jump op: " + op); }

Try / catch

try { jumpOp.write(out); } catch (RuntimeException e) { if ("not support".equals(e.getMessage())) { /* emit with a different opcode/op class */ } throw e; }

Prevention

When it happens

Trigger: Constructing a JumpOp with an opcode whose format is not implemented (goto_16/goto_32 variants not covered by the switch, or a non-branch opcode passed in).

Common situations: Code generators emitting branch instructions with unusual opcode choices; library gaps after dex version changes; mis-mapped Op constants.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of pxb1988/dex2jar@b5bda4fb49 (2026-09-08). Data as JSON: /api/errors/ff25a4d5416c9c38. Report an issue: GitHub.

Appendix: source

Thrown at dex-writer/src/main/java/com/googlecode/d2j/dex/writer/insn/JumpOp.java:59

                CodeWriter.checkContentShort(op, "+AAAA", offset);
                out.put((byte) 0).putShort((short) offset);
                break;
            case kFmt30t: // ØØ|op AAAAlo AAAAhi
                out.put((byte) 0).putInt(offset);
                break;
            case kFmt31t: // AA|op BBBBlo BBBBhi
                out.put((byte) a).putInt(offset);
                break;
            case kFmt22t: // B|A|op CCCC
                CodeWriter.checkContentShort(op, "+CCCC", offset);
                out.put((byte) ((a & 0xF) | (b << 4))).putShort((short) offset);
                break;
            case kFmt21t: // AA|op BBBB
                CodeWriter.checkContentShort(op, "+BBBB", offset);
                out.put((byte) a).putShort((short) offset);
                break;
            default:
                throw new RuntimeException("not support");
        }
    }

    public boolean fit() {
        int offset = label.offset - this.offset;
        if ((op == Op.GOTO && (offset > Byte.MAX_VALUE || offset < Byte.MIN_VALUE)) ||
                (op == Op.GOTO_16 && (offset > Short.MAX_VALUE || offset < Short.MIN_VALUE))
                ) {
            if ((offset > Short.MAX_VALUE || offset < Short.MIN_VALUE)) {
                op = Op.GOTO_32;
            } else {
                op = Op.GOTO_16;
            }
            return false;
        }
        return true;
    }
}

View on GitHub (pinned to b5bda4fb49)