Android 排除库冲突,Google找遍终于正确了

先看看网上的方法是怎么样的:

 implementation ('com.android.support:support-fragment:28.0.0'){
        exclude group: "com.android.support",module: 'versionedparcelable'
    }

是我盲区,上述对我无效,没能解决,当场哭了

我们来看看 错误日志 长啥样

Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.core.graphics.drawable.IconCompatParcelizer found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.core.internal.package-info found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-28.0.0-runtime.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.versionedparcelable.CustomVersionedParcelable found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.NonParcelField found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelField found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelImpl found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelImpl$1 found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelUtils found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel$1 found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel$ParcelException found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelParcel found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream$FieldBuffer found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelable found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelize found in modules versionedparcelable-1.1.0-runtime.jar (androidx.versionedparcelable:versionedparcelable:1.1.0) and versionedparcelable-28.0.0-runtime.jar (com.android.support:versionedparcelable:28.0.0)

Go to the documentation to learn how to Fix dependency resolution errors.

解决

其实出现这种最多就是引入的依赖中包含重复的类,只需要在两个或多个依赖中移除其他的,只保留其中一个就可以。

Android 排除库冲突,Google找遍终于正确了_第1张图片
Android 排除库冲突,Google找遍终于正确了_第2张图片

你可能感兴趣的:(Android,android,微信,sqlite)