在模块中发现重复的类 com.mapbox.android.telemetry.AlarmReceiver。 Mapbox安卓工作室
Posted
技术标签:
【中文标题】在模块中发现重复的类 com.mapbox.android.telemetry.AlarmReceiver。 Mapbox安卓工作室【英文标题】:Duplicate class com.mapbox.android.telemetry.AlarmReceiver found in modules. Mapbox Android studio 【发布时间】:2021-10-17 11:19:41 【问题描述】:我正在研究 android studio 中 mapbox 中的示例,但是当我运行它显示的代码时 FAILURE:构建失败并出现异常。
任务“:app:checkDebugDuplicateClasses”执行失败。 执行 com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable 时发生故障 在模块中发现重复的类 com.mapbox.android.telemetry.AlarmReceiver
这是我在 gradle 中的实现
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.6.2'
implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:9.6.2')
exclude group: 'group_name', module: 'module_name'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.11.0'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.8.0'
implementation('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6')
exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-plugin-annotation-v8'
这是它显示的错误
Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing
com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.mapbox.android.telemetry.AlarmReceiver found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.AlarmSchedulerFlusher found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.AppUserTurnstile found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.AppUserTurnstile$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.Attachment found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.Attachment$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.AttachmentListener found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.AttachmentMetadata found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.BuildConfig found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.CertificateBlacklist found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.CertificateBlacklist$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.CertificatePinnerFactory found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.CertificatePinnerFactory$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ChinaCertificatePins found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ChinaCertificatePins$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ChinaCertificatePins$1$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ChinaServerInformation found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.Clock found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ComCertificatePins found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ComCertificatePins$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ComCertificatePins$1$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ComServerInformation found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ConcurrentQueue found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ConfigurationChangeHandler found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ConfigurationClient found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ConfigurationClient$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.CrashEvent found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.Environment found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.EnvironmentChain found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.EnvironmentResolver found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.Event found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.Event$Type found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.EventsQueue found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.EventsQueue$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.FileAttachment found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.FileData found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.FullQueueCallback found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.GzipRequestInterceptor found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.GzipRequestInterceptor$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.LocationEvent found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.LocationEvent$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.Logger found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$2 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$3 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$4 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$5 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$6 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$7 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$ExecutorServiceFactory found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetry$ExecutorServiceFactory$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.MapboxTelemetryConstants found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.SchedulerCallback found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.SchedulerFlusher found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.SchedulerFlusherFactory found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ServerInformation found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.ServiceTaskCallback found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.SessionInterval found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.StagingCertificatePins found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.StagingCertificatePins$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.StagingCertificatePins$1$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.StagingServerInformation found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryCallback found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryClient found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryClient$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryClientFactory found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryClientFactory$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryClientSettings found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryClientSettings$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryClientSettings$Builder found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryEnabler found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryEnabler$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryEnabler$2 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryEnabler$State found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryListener found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryResponse found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryUtils found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.TelemetryUtils$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.VisionBuildEvent found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.VisionEvent found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.VisionEvent$1 found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)
Duplicate class com.mapbox.android.telemetry.VisionEventFactory found in modules jetified-mapbox-android-telemetry-4.7.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry:4.7.0) and mapbox-android-telemetry-okhttp3-8.1.0-runtime (com.mapbox.mapboxsdk:mapbox-android-telemetry-okhttp3:8.1.0)...
我已经在 gradle.properties 中添加了 android.enableJetifier=true 但它仍然显示错误。谁能帮我。我目前被卡住了。
【问题讨论】:
【参考方案1】:如果您检查哪些模块实际上是重复的,您会发现它是 mapbox-android-telemetry。因此,您正在寻找的是:
implementation ("com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6",
exclude group: 'com.mapbox.mapboxsdk', module:'mapbox-android-telemetry'
)
请注意,com.mapbox.navigation:ui 的最新版本在本文发布时为 1.5.1。因此我建议使用:
implementation ("com.mapbox.navigation:ui:1.5.1",
exclude group: 'com.mapbox.mapboxsdk', module:'mapbox-android-telemetry'
)
(另请注意,'group_name' 和 'module_name' 是代码 sn-p 中的占位符)
【讨论】:
【参考方案2】:评论这一行的实现:
com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6
并同步您的项目。
【讨论】:
以上是关于在模块中发现重复的类 com.mapbox.android.telemetry.AlarmReceiver。 Mapbox安卓工作室的主要内容,如果未能解决你的问题,请参考以下文章
在模块中发现重复的类 com.mapbox.android.telemetry.AlarmReceiver。 Mapbox安卓工作室
Flutter 构建 apk:在模块 guava-26.0-android.jar 和 listenablefuture-1.0.jar 中发现了重复的类
在模块 guava-20.0.jar (com.google.guava:guava:20.0) 中发现重复的类 com.google.common.util.concurrent.Listenabl
在模块 jetified-com.google.zxing.client.android.captureactivity.jar 和 jetified-core-3.3.3.jar 中发现重复的类 c
在模块 jetified-okhttp-3.12.0 和 jetified-okhttp-ws-3.4.1 中发现重复的类 okhttp3.internal.ws.RealWebSocket
在模块类中找到重复的类 android.support.v4.app.INotificationSideChannel?