Open YoavSl opened 8 months ago
Can you provide more details of the error log and stack trace?
Sure and thanks for your help. In version 1.0.0 of 'mapbox_maps_flutter' they updated some of their modules, and you are still using an older versions. Because both plugins share some of these libraries there are conflicts (because of the different versions being used in each one). I'm getting a lot of 'Duplicate classes' errors: Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.mapbox.common.module.okhttp.CallbackWrapper found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and 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 jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.HttpCallback found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.IdGenerator found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.LazyClient found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.MapboxOkHttpService found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and 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 jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and 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 jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and 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 jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and 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 jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and 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 jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.NetworkUsageListener found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.NetworkUsageListener$1 found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.common.module.okhttp.NetworkUsageListener$DummyEventListener found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and 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 jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0) Duplicate class com.mapbox.module.Mapbox_HttpClientModuleConfiguration found in modules jetified-common-24.2.0-runtime (com.mapbox.common:common:24.2.0) and jetified-okhttp-23.8.0-runtime (com.mapbox.common:okhttp:23.8.0)
I'm facing the same issue. Does anyone have a solution for it? mapbox_maps_flutter: ^1.0.0 flutter_mapbox_navigation: ^0.2.2
Is there any update on this i am also facing same issue @YoavSl have you found any alternative solution? please help thanks.
Is there any update on this i am also facing same issue @YoavSl have you found any alternative solution? please help thanks.
Sorry, couldn't find any solution. Reverted to the previous working version (mapbox_maps_flutter 0.5.1).
Same issue :-(
When trying to use this library in addition to "mapbox_maps_flutter: ^1.0.0" the build would fail with a lot of "Execution failed for task ':app:checkDebugDuplicateClasses'"" errors as these 2 libraries share some basic classes of MapBox and the classes don't match. If I'm reverting to the previous version of the official MapBox library: "mapbox_maps_flutter: ^0.5.1" everything is working fine. I have to use these two side by side as each one of them is giving me some features that I need.