All Products
Document Center

Solve conflict with dependency on wire/okio

Last Updated: Feb 10, 2022

Conflict description

As mPaaS uses wire/okio for RPC network connection, and okhttp also needs to reference okio, so when you use mPaaS with okhttp, then there may be a wire/okio conflict.


Remove the wire/okio dependency from mPaaS and perform regression testing of the Mobile gateway to ensure its proper function.


  1. Confirm the version of wire/okio used by mPaaS.

  2. Get the group:artifact information for the mPaaS third-party SDK.

  3. Remove the mPaaS library.

    • AAR method

      If you are using the native AAR method to access mPaaS, the dependency passing of gradle will automatically use a later version and there is no need to actively remove it. In general, the version chosen for use by mPaaS is highly stable and secure, and we recommend you to use the version provided by mPaaS. If versions are inconsistent, please test the mPaaS function before its launch to ensure stability.
    • mPaaS Inside and Portal&Bundle
      mpaascomponents {
      excludeDependencies = [""]
  4. Add back wire or okio (use wire/okio of public network. The native AAR access method is not a concern).

    As mPaaS writes dependency of both wire and okio in the library, you need to add them back optionally, as the case may be.

    • If there is only an okio conflict, but not a wire conflict, you need to add back the wire.

      implementation 'com.squareup.wire:wire-lite-runtime:'
    • If there is only a wire conflict, but not an okio conflict, you need to add back the okio.