Answer the question
In order to leave comments, you need to log in
How to get rid of duplicate classes when installing and building the Mapbox SDK?
I recently ran into a big problem when downloading and unpacking the Mapbox SDK for Android:
Duplicate class com.mapbox.mapboxsdk.maps.Style$Builder$LayerBelowWrapper found in modules jetified-android-sdk-9.2.1-runtime (org.maplibre.gl:android-sdk:9.2.1) and jetified-mapbox-android-sdk-9.6.1-runtime (com.mapbox.mapboxsdk:mapbox-android-sdk:9.6.1)
Duplicate class com.mapbox.mapboxsdk.maps.Style$Builder$LayerWrapper found in modules jetified-android-sdk-9.2.1-runtime (org.maplibre.gl:android-sdk:9.2.1) and jetified-mapbox-android-sdk-9.6.1-runtime (com.mapbox.mapboxsdk:mapbox-android-sdk:9.6.1)
Duplicate class com.mapbox.mapboxsdk.maps.Style$OnStyleLoaded found in modules jetified-android-sdk-9.2.1-runtime (org.maplibre.gl:android-sdk:9.2.1) and jetified-mapbox-android-sdk-9.6.1-runtime (com.mapbox.mapboxsdk:mapbox-android-sdk:9.6.1)
Answer the question
In order to leave comments, you need to log in
In maven, such collisions are solved like this:
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>${storm.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question