skylot/jadx · error · JadxRuntimeException

Unsupported method handle type: {}

Error message

Unsupported method handle type: {}

What it means

InvokeCustomUtils.convertInvokeType() maps a MethodHandleType to an InvokeType. It handles INVOKE_STATIC/INSTANCE/DIRECT/CONSTRUCTOR/INTERFACE and throws on anything else — i.e. any field handle type (STATIC_PUT/GET, INSTANCE_PUT/GET), which has no invoke equivalent.

Source

Thrown at jadx-core/src/main/java/jadx/core/dex/instructions/invokedynamic/InvokeCustomUtils.java:22

import jadx.core.dex.instructions.InvokeType;
import jadx.core.utils.exceptions.JadxRuntimeException;

public class InvokeCustomUtils {

	public static InvokeType convertInvokeType(MethodHandleType type) {
		switch (type) {
			case INVOKE_STATIC:
				return InvokeType.STATIC;
			case INVOKE_INSTANCE:
				return InvokeType.VIRTUAL;
			case INVOKE_DIRECT:
			case INVOKE_CONSTRUCTOR:
				return InvokeType.DIRECT;
			case INVOKE_INTERFACE:
				return InvokeType.INTERFACE;

			default:
				throw new JadxRuntimeException("Unsupported method handle type: " + type);
		}
	}
}

View on GitHub (pinned to e738a26571)

Solutions

  1. Upgrade JADX.
  2. Check that the method handle is not a field type before calling convertInvokeType (use handle.getType().isField()).
  3. Inspect the bootstrap method handle type with baksmali.
  4. Report upstream if the handle should legitimately be convertible.

Example fix

// before
InvokeType t = InvokeCustomUtils.convertInvokeType(handle.getType());

// after
if (handle.getType().isField()) {
    // field handle: handle separately or skip
} else {
    InvokeType t = InvokeCustomUtils.convertInvokeType(handle.getType());
}
Defensive patterns

Strategy: type-guard

Validate before calling

// Guard before converting a method handle type to an invoke type.
if (!handle.getType().isField()) {
    InvokeType t = InvokeCustomUtils.convertInvokeType(handle.getType());
}

Type guard

// Only invoke-handle types are convertible.
static boolean isConvertible(MethodHandleType t) {
    switch (t) {
        case INVOKE_STATIC: case INVOKE_INSTANCE: case INVOKE_DIRECT:
        case INVOKE_CONSTRUCTOR: case INVOKE_INTERFACE: return true;
        default: return false;
    }
}

Try / catch

try {
    InvokeType t = InvokeCustomUtils.convertInvokeType(handle.getType());
} catch (JadxRuntimeException e) {
    if (e.getMessage().contains("Unsupported method handle type")) {
        log.warn("Field method-handle type cannot convert to invoke type", e);
    } else throw e;
}

Prevention

When it happens

Trigger: convertInvokeType is called with a field MethodHandleType. This happens when an invoke-custom's method handle is a field handle but code assumes it is an invoke handle.

Common situations: Field-handle bootstrap methods or a code path that does not check isField() before converting. Often a downstream symptom of the same condition that triggers errors 112/113.

Related errors


AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14). Data as JSON: /api/errors/38db3ff8795fed68. Report an issue: GitHub.