mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
476 stars 133 forks source link

Duplicate class on build #1913

Closed darksnow closed 1 year ago

darksnow commented 1 year ago

Environment

Observed behavior and steps to reproduce

I've added a dependency to gradle and the application appears to find everything it needs. This is the only dependency I've added for a simple test app to make sure my style will work with this SDK version.

dependencies {
    implementation 'com.mapbox.maps:android:10.10.0'
}

But I'm getting a build failure related to duplicate classes:

Execution failed for task ':app:checkDebugDuplicateClasses'.
Duplicate class com.mapbox.android.core.location.LocationEngine found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)
Duplicate class com.mapbox.android.core.location.LocationEngineCallback found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)
Duplicate class com.mapbox.android.core.location.LocationEngineProvider found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)
Duplicate class com.mapbox.android.core.location.LocationEngineRequest found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)
Duplicate class com.mapbox.android.core.location.LocationEngineRequest$1 found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)
Duplicate class com.mapbox.android.core.location.LocationEngineRequest$Builder found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)
Duplicate class com.mapbox.android.core.location.LocationEngineResult found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)
Duplicate class com.mapbox.android.core.permissions.PermissionsListener found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)
Duplicate class com.mapbox.android.core.permissions.PermissionsManager found in modules jetified-common-23.2.1-runtime (com.mapbox.common:common:23.2.1) and jetified-mapbox-android-core-3.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.0.0)

Notes / preliminary analysis

If I look at the error above and try to remove the duplicates I can make the build work:

dependencies {
  implementation ('com.mapbox.maps:android:10.10.0', {
    exclude group: 'com.mapbox.common', module: 'common'
  })
}

But then the application fails to run with an exception:

java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/common/MapboxSDKCommonInitializer;

This looks like perhaps it's a result of excluding the common module. Though perhaps that is the real error I'm reporting.

yunikkk commented 1 year ago

@DarkSnow you shouldn't exclude com.mapbox.common, it's an internal maps dependency needed for launch. The redundant library in your case seem to be com.mapbox.mapboxsdk:mapbox-android-core, could you check gradle dependencies to see where it is coming from? We've removed it from Maps in 10.10 so it shouldn't transitively appear in your app as well.

darksnow commented 1 year ago

Thanks for the quick response.

Yeah, by excluding common, the build works but the application fails to load, which is as expected really. I've tried changing the exclude to:

implementation ('com.mapbox.maps:android:10.10.0', {
    exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-core'
})

There's no change, I get the same error. The dependency tree is included below, it looks like it's being pulled in by com.mapbox.mapboxsdk:mapbox-android-telemetry

Since you said this has already been removed I completely deleted my .gradle/caches directory and did a full rebuild, with no change.

debugRuntimeClasspath - Resolved configuration for runtime for variant: debug
+--- com.google.android.material:material:1.6.1
|    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    +--- androidx.appcompat:appcompat:1.1.0 -> 1.5.1
|    |    +--- androidx.activity:activity:1.5.1
|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0
|    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.core:core:1.8.0
|    |    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    |    |    +--- androidx.annotation:annotation-experimental:1.1.0
|    |    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    |    +--- androidx.concurrent:concurrent-futures:1.0.0
|    |    |    |    |    +--- com.google.guava:listenablefuture:1.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.5.1
|    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    |    +--- androidx.arch.core:core-common:2.1.0
|    |    |    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    |    +--- androidx.arch.core:core-runtime:2.1.0
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    |    |    \--- androidx.arch.core:core-common:2.1.0 (*)
|    |    |    |    |    \--- androidx.lifecycle:lifecycle-common:2.5.1
|    |    |    |    |         \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    \--- androidx.versionedparcelable:versionedparcelable:1.1.1
|    |    |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |         \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1
|    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10
|    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10
|    |    |    |    |    \--- org.jetbrains:annotations:13.0
|    |    |    |    \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1 (c)
|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    +--- androidx.core:core-ktx:1.2.0 -> 1.8.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    |    +--- androidx.core:core:1.8.0 (*)
|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)
|    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.5.1
|    |    |    |    |    +--- androidx.arch.core:core-common:2.1.0 (*)
|    |    |    |    |    +--- androidx.arch.core:core-runtime:2.1.0 (*)
|    |    |    |    |    \--- androidx.lifecycle:lifecycle-common:2.5.1 (*)
|    |    |    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
|    |    |    |    +--- androidx.savedstate:savedstate:1.2.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    |    +--- androidx.arch.core:core-common:2.1.0 (*)
|    |    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.4.0 -> 2.5.1 (*)
|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.7.10 (*)
|    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)
|    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1
|    |    |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1
|    |    |    |         |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.1
|    |    |    |         |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.1
|    |    |    |         |         |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 (c)
|    |    |    |         |         |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1 (c)
|    |    |    |         |         |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.1 (c)
|    |    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0
|    |    |    |         |         |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.7.10 (*)
|    |    |    |         |         |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.0
|    |    |    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.7.10 (*)
|    |    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.0 -> 1.7.10
|    |    |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.1 (*)
|    |    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0 (*)
|    |    |    +--- androidx.savedstate:savedstate:1.2.0 (*)
|    |    |    +--- androidx.tracing:tracing:1.0.0
|    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)
|    |    +--- androidx.annotation:annotation:1.3.0
|    |    +--- androidx.appcompat:appcompat-resources:1.5.1
|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    +--- androidx.core:core:1.6.0 -> 1.8.0 (*)
|    |    |    +--- androidx.vectordrawable:vectordrawable:1.1.0
|    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
|    |    |    |    \--- androidx.collection:collection:1.1.0 (*)
|    |    |    +--- androidx.vectordrawable:vectordrawable-animated:1.1.0
|    |    |    |    +--- androidx.vectordrawable:vectordrawable:1.1.0 (*)
|    |    |    |    +--- androidx.interpolator:interpolator:1.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    \--- androidx.collection:collection:1.1.0 (*)
|    |    |    \--- androidx.appcompat:appcompat:1.5.1 (c)
|    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    +--- androidx.core:core:1.8.0 (*)
|    |    +--- androidx.core:core-ktx:1.8.0 (*)
|    |    +--- androidx.cursoradapter:cursoradapter:1.0.0
|    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    +--- androidx.drawerlayout:drawerlayout:1.0.0 -> 1.1.1
|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.core:core:1.2.0 -> 1.8.0 (*)
|    |    |    \--- androidx.customview:customview:1.1.0
|    |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |         +--- androidx.core:core:1.3.0 -> 1.8.0 (*)
|    |    |         \--- androidx.collection:collection:1.1.0 (*)
|    |    +--- androidx.emoji2:emoji2:1.2.0
|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    |    +--- androidx.collection:collection:1.1.0 (*)
|    |    |    +--- androidx.core:core:1.3.0 -> 1.8.0 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-process:2.4.1
|    |    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.4.1 -> 2.5.1 (*)
|    |    |    |    +--- androidx.startup:startup-runtime:1.1.1
|    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    |    \--- androidx.tracing:tracing:1.0.0 (*)
|    |    |    |    \--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    |    \--- androidx.startup:startup-runtime:1.0.0 -> 1.1.1 (*)
|    |    +--- androidx.emoji2:emoji2-views-helper:1.2.0
|    |    |    +--- androidx.collection:collection:1.1.0 (*)
|    |    |    +--- androidx.core:core:1.3.0 -> 1.8.0 (*)
|    |    |    \--- androidx.emoji2:emoji2:1.2.0 (*)
|    |    +--- androidx.fragment:fragment:1.3.6 -> 1.5.3
|    |    |    +--- androidx.activity:activity:1.5.1 (*)
|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.annotation:annotation-experimental:1.0.0 -> 1.1.0
|    |    |    +--- androidx.collection:collection:1.1.0 (*)
|    |    |    +--- androidx.core:core-ktx:1.2.0 -> 1.8.0 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.5.1 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1 (*)
|    |    |    +--- androidx.loader:loader:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
|    |    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0
|    |    |    |    |    +--- androidx.arch.core:core-runtime:2.0.0 -> 2.1.0 (*)
|    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0 -> 2.5.1 (*)
|    |    |    |    |    \--- androidx.arch.core:core-common:2.0.0 -> 2.1.0 (*)
|    |    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.5.1 (*)
|    |    |    +--- androidx.savedstate:savedstate:1.2.0 (*)
|    |    |    +--- androidx.viewpager:viewpager:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0 -> 1.1.0 (*)
|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)
|    |    +--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*)
|    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
|    |    +--- androidx.resourceinspection:resourceinspection-annotation:1.0.1
|    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    +--- androidx.savedstate:savedstate:1.2.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 (*)
|    |    \--- androidx.appcompat:appcompat-resources:1.5.1 (c)
|    +--- androidx.cardview:cardview:1.0.0
|    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0
|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
|    |    +--- androidx.customview:customview:1.0.0 -> 1.1.0 (*)
|    |    \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    +--- androidx.constraintlayout:constraintlayout:2.0.1
|    |    +--- androidx.appcompat:appcompat:1.2.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core:1.3.1 -> 1.8.0 (*)
|    |    \--- androidx.constraintlayout:constraintlayout-solver:2.0.1
|    +--- androidx.core:core:1.5.0 -> 1.8.0 (*)
|    +--- androidx.drawerlayout:drawerlayout:1.1.1 (*)
|    +--- androidx.dynamicanimation:dynamicanimation:1.0.0
|    |    +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
|    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    \--- androidx.legacy:legacy-support-core-utils:1.0.0
|    |         +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |         +--- androidx.core:core:1.0.0 -> 1.8.0 (*)
|    |         +--- androidx.documentfile:documentfile:1.0.0
|    |         |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |         +--- androidx.loader:loader:1.0.0 (*)
|    |         +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
|    |         |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |         \--- androidx.print:print:1.0.0
|    |              \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- androidx.annotation:annotation-experimental:1.0.0 -> 1.1.0
|    +--- androidx.fragment:fragment:1.2.5 -> 1.5.3 (*)
|    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.5.1 (*)
|    +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0
|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
|    |    +--- androidx.customview:customview:1.0.0 -> 1.1.0 (*)
|    |    \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    +--- androidx.transition:transition:1.2.0 -> 1.4.1
|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
|    |    \--- androidx.collection:collection:1.1.0 (*)
|    +--- androidx.vectordrawable:vectordrawable:1.1.0 (*)
|    \--- androidx.viewpager2:viewpager2:1.0.0
|         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|         +--- androidx.fragment:fragment:1.1.0 -> 1.5.3 (*)
|         +--- androidx.recyclerview:recyclerview:1.1.0 (*)
|         +--- androidx.core:core:1.1.0 -> 1.8.0 (*)
|         \--- androidx.collection:collection:1.1.0 (*)
+--- com.mapbox.mapboxsdk:mapbox-android-telemetry:6.1.0
|    +--- com.squareup.okhttp3:okhttp:3.12.0 -> 4.9.2
|    |    +--- com.squareup.okio:okio:2.8.0
|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.0 -> 1.7.10 (*)
|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0 -> 1.7.10
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.7.10 (*)
|    +--- com.google.code.gson:gson:2.8.5 -> 2.8.6
|    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- com.mapbox.mapboxsdk:mapbox-android-core:3.0.0
|    \--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
+--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.6.0
|    \--- com.google.code.gson:gson:2.8.6
+--- com.mapbox.mapboxsdk:mapbox-android-sdk:8.6.6 -> 9.2.0
|    +--- com.mapbox.mapboxsdk:mapbox-android-telemetry:5.0.1 -> 6.1.0 (*)
|    +--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.0.0 -> 5.6.0 (*)
|    +--- com.mapbox.mapboxsdk:mapbox-android-gestures:0.7.0 -> 0.8.0
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.core:core:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0
|    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- com.mapbox.mapboxsdk:mapbox-sdk-turf:5.0.0
|    |    \--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.0.0 -> 5.6.0 (*)
|    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    +--- androidx.fragment:fragment:1.0.0 -> 1.5.3 (*)
|    \--- com.squareup.okhttp3:okhttp:3.12.3 -> 4.9.2 (*)
+--- com.mapbox.mapboxsdk:mapbox-android-gestures:0.7.0 -> 0.8.0 (*)
+--- com.mapbox.mapboxsdk:mapbox-sdk-services:5.6.0
|    +--- com.mapbox.mapboxsdk:mapbox-sdk-core:5.6.0
|    |    +--- com.google.code.gson:gson:2.8.6
|    |    +--- com.squareup.retrofit2:retrofit:2.7.1
|    |    |    \--- com.squareup.okhttp3:okhttp:3.14.4 -> 4.9.2 (*)
|    |    +--- com.squareup.retrofit2:converter-gson:2.7.1
|    |    |    +--- com.squareup.retrofit2:retrofit:2.7.1 (*)
|    |    |    \--- com.google.code.gson:gson:2.8.5 -> 2.8.6
|    |    \--- com.squareup.okhttp3:logging-interceptor:3.12.7
|    |         \--- com.squareup.okhttp3:okhttp:3.12.7 -> 4.9.2 (*)
|    +--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.6.0 (*)
|    +--- com.mapbox.mapboxsdk:mapbox-sdk-directions-models:5.6.0
|    |    +--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.6.0 (*)
|    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    \--- com.mapbox.mapboxsdk:mapbox-sdk-directions-refresh-models:5.6.0
|         +--- com.mapbox.mapboxsdk:mapbox-sdk-directions-models:5.6.0 (*)
|         \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
+--- com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0
|    +--- androidx.appcompat:appcompat:1.0.0 -> 1.5.1 (*)
|    \--- com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0 (*)
+--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.9.2 (*)
+--- com.mapbox.maps:android:10.10.0
|    +--- com.mapbox.base:common:0.8.0
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10 -> 1.6.0 (*)
|    |    +--- com.mapbox.base:annotations:0.8.0
|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10 -> 1.6.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.common:okhttp:23.2.1
|    |    +--- com.mapbox.common:common:23.2.1
|    |    |    +--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.4.1 -> 5.6.0 (*)
|    |    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    |    +--- com.mapbox.common:logger:0.8.0
|    |    |    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10 -> 1.6.0 (*)
|    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- com.mapbox.common:loader:0.8.0
|    |    |    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10 -> 1.6.0 (*)
|    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    |    +--- com.mapbox.base:annotations:0.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31 -> 1.6.0 (*)
|    |    |    +--- androidx.startup:startup-runtime:1.1.0 -> 1.1.1 (*)
|    |    |    \--- androidx.core:core:1.6.0 -> 1.8.0 (*)
|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    +--- com.squareup.okhttp3:okhttp:4.9.2 (*)
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31 -> 1.6.0 (*)
|    +--- com.mapbox.maps:base:10.10.0
|    |    +--- com.mapbox.mapboxsdk:mapbox-android-gestures:0.8.0 (*)
|    |    +--- com.mapbox.maps:android-core:10.10.0
|    |    |    +--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.4.1 -> 5.6.0 (*)
|    |    |    +--- com.mapbox.common:common:23.2.0 -> 23.2.1 (*)
|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31 -> 1.6.0 (*)
|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    \--- androidx.startup:startup-runtime:1.1.0 -> 1.1.1 (*)
|    |    +--- com.mapbox.common:common:23.2.1 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.extension:maps-style:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.4.1 -> 5.6.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.plugin:maps-logo:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.plugin:maps-compass:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.plugin:maps-gestures:10.10.0
|    |    +--- com.mapbox.mapboxsdk:mapbox-android-gestures:0.8.0 (*)
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.plugin:maps-attribution:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- com.mapbox.base:annotations:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.plugin:maps-locationcomponent:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    \--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.4.1 -> 5.6.0 (*)
|    +--- com.mapbox.plugin:maps-animation:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- androidx.interpolator:interpolator:1.0.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    \--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    +--- com.mapbox.plugin:maps-scalebar:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.plugin:maps-overlay:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.plugin:maps-annotation:10.10.0
|    |    +--- com.mapbox.extension:maps-style:10.10.0 (*)
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- com.mapbox.base:annotations:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.extension:maps-localization:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.extension:maps-style:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- com.mapbox.plugin:maps-lifecycle:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    \--- androidx.lifecycle:lifecycle-runtime:2.3.0 -> 2.5.1 (*)
|    +--- com.mapbox.plugin:maps-viewport:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.plugin:maps-animation:10.10.0 (*)
|    |    +--- com.mapbox.plugin:maps-locationcomponent:10.10.0 (*)
|    |    +--- androidx.appcompat:appcompat:1.3.0 -> 1.5.1 (*)
|    |    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    |    \--- com.mapbox.base:common:0.8.0 (*)
|    +--- com.mapbox.base:annotations:0.8.0 (*)
|    +--- com.mapbox.module:maps-telemetry:10.10.0
|    |    +--- com.mapbox.maps:base:10.10.0 (*)
|    |    +--- com.mapbox.base:common:0.8.0 (*)
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31 -> 1.6.0 (*)
|    +--- androidx.core:core-ktx:1.7.0 -> 1.8.0 (*)
|    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
+--- androidx.multidex:multidex:2.0.1
+--- androidx.appcompat:appcompat:1.5.1 (*)
+--- androidx.exifinterface:exifinterface:1.3.3
|    \--- androidx.annotation:annotation:1.2.0 -> 1.3.0
+--- androidx.viewpager2:viewpager2:1.0.0 (*)
+--- androidx.fragment:fragment:1.5.3 (*)
+--- androidx.transition:transition:1.4.1 (*)
+--- :nativescript-optimized-with-inspector
+--- :widgets-release
\--- :core
yunikkk commented 1 year ago

@DarkSnow seems you still declare many older Mapbox dependencies that are not needed anymore, e.g. com.mapbox.mapboxsdk:mapbox-android-sdk com.mapbox.mapboxsdk:mapbox-android-telemetry com.mapbox.mapboxsdk:mapbox-sdk-services com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9

darksnow commented 1 year ago

I did some more digging and it looks like they are being pulled in my the Nativescript community mapbox package,which is expecting a much older MapBox library version (8.6.6) so I'll follow up on their repo.

Is there any recommended cross platform way to build a MapBox app?

Thanks for the help and sorry for the noise.

yunikkk commented 1 year ago

@DarkSnow ah, that explains the crash. Check the https://github.com/rnmapbox/maps v10 maps beta releases, if I'm not mistaken the community has them released in beta. Another cross platform option is flutter, https://pub.dev/packages/mapbox_maps_flutter is official Mapbox v10 plugin, currently in beta.

cchierici commented 1 year ago

Hi i encountered the same issue while upgrading to MapboxSDK 10.10. from 9.5 In my case this comes from using the navigation sdk 2.7.0 which seems to depend on the com.mapbox.common.

implementation "com.mapbox.navigation:android:2.7.0" updating to the latest did not help.

When i remove it the duplicated LocationEngine disappears, but of course i still want to use Navigation... Any idea to get this compatible?

I also tried to exclude group: 'com.mapbox.common', module: 'common' but i don't get rid of it. It still appears in the external libraries list

cchierici commented 1 year ago

Ok, this does resolve the duplicated class build issue for me. But i did not yet test the runtime behaviour

implementation ("com.mapbox.navigation:android:$libs.mapbox_navigation", {
        exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-core'
    })
wonderfulday-john commented 1 year ago

try this instead

implementation "com.mapbox.mapboxsdk:mapbox-android-core:5.0.0" 
implementation('com.mapbox.mapboxsdk:mapbox-android-core:5.0.0') {
         exclude group: 'com.mapbox.common', module: 'common'
}
cchierici commented 1 year ago

try this instead

implementation "com.mapbox.mapboxsdk:mapbox-android-core:5.0.0" 
implementation('com.mapbox.mapboxsdk:mapbox-android-core:5.0.0') {
         exclude group: 'com.mapbox.common', module: 'common'
}

Is this also compatible with Mapbox 10? I.e. when you also have the dependency to the new SDK structure:

implementation "com.mapbox.maps:android:10.10.0"

because that always caused some trouble with duplicated classes, since some of the add on libraries still have dependendencies to the older Mapbox packaging structure

rishavgoenka111 commented 1 year ago
Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-javalite-3.21.7 (com.google.protobuf:protobuf-javalite:3.21.7) and jetified-protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder found in modules jetified-protobuf-javalite-3.21.7 (com.google.protobuf:protobuf-javalite:3.21.7) and jetified-protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)

Any suggestions for this?

Hi99simon commented 1 year ago

Execution failed for task ':app:checkReleaseDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.mapbox.android.core.location.LocationEngine found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.location.LocationEngineCallback found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.location.LocationEngineProvider found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.location.LocationEngineRequest found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.location.LocationEngineRequest$1 found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.location.LocationEngineRequest$Builder found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.location.LocationEngineResult found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.permissions.PermissionsListener found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.permissions.PermissionsManager found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0) Duplicate class com.mapbox.android.core.permissions.PermissionsManager$AccuracyAuthorization found in modules jetified-common-23.2.2-runtime (com.mapbox.common:common:23.2.2) and jetified-mapbox-android-core-5.0.0-runtime (com.mapbox.mapboxsdk:mapbox-android-core:5.0.0)

 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
alexander0205 commented 1 year ago

code android/app/build.gradle add the following

android {
    packagingOptions {
        pickFirst 'lib/x86/libc++_shared.so'
        pickFirst 'lib/x86_64/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
    }
}
thiagomacauba88 commented 1 year ago

Hey people, I'm getting a similar issue... I already tried to fix it according to your comments but nothing :(

implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6' implementation 'com.mapbox.maps:android:10.14.1' implementation ('com.mapbox.maps:android:10.14.1') { exclude group: 'group_name', module: 'module_name' }

What's wrong?

ghost commented 1 year ago

Didn't find class "com.mapbox.common.MapboxSDKCommonInitializer"

i am facing this error right now can anyone help me in this.

kajmaswanganye commented 8 months ago

try this

implementation("com.mapbox.mapboxsdk:mapbox-android-core:5.0.2") { exclude (group = "com.mapbox.common", module = "common") }

903531306 commented 7 months ago

May I ask if it has been resolved Integrated com. mapbox. mapboxsdk: mapbox android sdk: 9.7.0 Then search com. mapbox. search: mapbox search android: 1.0.0 rc.6 in the integrated search

error

Duplicate class com. mapbox. android. core. location LocationEngine found in modules jettified common 23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. location LocationEngine Callback found in modules jettified common 23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. location LocationEngine Provider found in modules jettified common 23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. location LocationEngine Request found in modules jettified common 23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. location LocationEngine Request $1 found in modules jettified common 23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. location LocationEngine Request $Builder found in modules jettified common -23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. location LocationEngine Result found in modules jettified common 23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. permissions PermissionsListener found in modules jettified common 23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. permissions PermissionsManager found in modules tailored common 23.6.0 runtime (com. mapbox. common: common: 23.6.0) and tailored mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0) Duplicate class com. mapbox. android. core. permissions PermissionsManager $AccuracyAuthorization found in modules jettified common -23.6.0 runtime (com. mapbox. common: common: 23.6.0) and jettified mapbox android core 5.0.0 runtime (com. mapbox. mapboxsdk: mapbox android core: 5.0.0)

gradle:7.2.2 gradle-7.5-all.zip android 33

I vomited

darksnow commented 7 months ago

Yes, this was due to an old Mapbox library pulling old dependencies. This can be closed, thanks for the help.

SalmanNaghori commented 1 month ago

Error Generated by this package how can I resolve it: flutter_mapbox_navigation: ^0.2.2 mapbox_maps_flutter: ^2.2.1

What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.mapbox.android.core.permissions.PermissionsListener found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and mapbox-android-core-3.1.1.aar -> jetified-mapbox-android-core-3.1.1-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.1.1) Duplicate class com.mapbox.android.core.permissions.PermissionsManager found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and mapbox-android-core-3.1.1.aar -> jetified-mapbox-android-core-3.1.1-runtime (com.mapbox.mapboxsdk:mapbox-android-core:3.1.1) Duplicate class com.mapbox.common.module.okhttp.CallbackWrapper found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.CallbackWrapper$RequestCallback found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.HttpCallback found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.IdGenerator found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.LazyClient found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.MapboxOkHttpService found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.MapboxOkHttpService$1 found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.MapboxOkHttpService$HttpServiceGetLifecycleStateCallback found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.MapboxOkHttpService$HttpServiceLifecycleObserver found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.MapboxOkHttpService$HttpServiceOfflineSwitchObserver found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.MapboxOkHttpService$QueuedRequest found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.NetworkUsageListener found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.NetworkUsageListener$NetworkUsageMetricCallback found in modules common-24.6.0.aar -> jetified-common-24.6.0-runtime (com.mapbox.common:common:24.6.0) and okhttp-23.8.0.aar -> jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0)