Tencent/tinker · error · TinkerRuntimeException

patchReporter is already set.

Error message

patchReporter is already set.

What it means

Error "patchReporter is already set." thrown in Tencent/tinker.

Source

Thrown at tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/Tinker.java:349

        }

        public Builder loadReport(LoadReporter loadReporter) {
            if (loadReporter == null) {
                throw new TinkerRuntimeException("loadReporter must not be null.");
            }
            if (this.loadReporter != null) {
                throw new TinkerRuntimeException("loadReporter is already set.");
            }
            this.loadReporter = loadReporter;
            return this;
        }

        public Builder patchReporter(PatchReporter patchReporter) {
            if (patchReporter == null) {
                throw new TinkerRuntimeException("patchReporter must not be null.");
            }
            if (this.patchReporter != null) {
                throw new TinkerRuntimeException("patchReporter is already set.");
            }
            this.patchReporter = patchReporter;
            return this;
        }

        public Builder listener(PatchListener listener) {
            if (listener == null) {
                throw new TinkerRuntimeException("listener must not be null.");
            }
            if (this.listener != null) {
                throw new TinkerRuntimeException("listener is already set.");
            }
            this.listener = listener;
            return this;
        }

        public Tinker build() {
            if (status == -1) {

View on GitHub (pinned to 1b7ea02c23)

Solutions

  1. Call Builder.patchReporter() only once per Tinker.Builder instance; build the Tinker instance before setting it again.
  2. Reuse the existing Builder instead of calling patchReporter() a second time.

When it happens

Trigger: Thrown at tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/Tinker.java:349 when the library encounters an invalid state.

Common situations: Thrown from Tinker.Builder.patchReporter() when a PatchReporter was already assigned to the same Builder. Indicates duplicate builder configuration, typically from calling the builder method twice or sharing a Builder across setup code paths.


AI-assisted analysis of Tencent/tinker@1b7ea02c23 (2026-08-14). Data as JSON: /api/errors/8ad5b8f2ae93d9d8. Report an issue: GitHub.