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.
Solution
Remove the wire/okio dependency from mPaaS and perform regression testing of the Mobile gateway to ensure its proper function.
Procedure
Confirm the version of wire/okio used by mPaaS.
'com.squareup.okio:okio:1.7.0@jar' 'com.squareup.wire:wire-lite-runtime:1.5.3.4@jar'
Get the
group:artifact
information for the mPaaS third-party SDK.'com.alipay.android.phone.thirdparty:wire-build'
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 = ["com.alipay.android.phone.thirdparty:wire-build"] }
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 thecom.alipay.android.phone.thirdparty:wire-build
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:1.5.3.4@jar'
If there is only a wire conflict, but not an okio conflict, you need to add back the okio.
'com.squareup.okio:okio:1.7.0@jar'