mapbox / mapbox-vision-android

Other
50 stars 43 forks source link

Crash issues while integrating Navigation and Vision in Single App using Kotlin #284

Open deepaA9299 opened 1 year ago

deepaA9299 commented 1 year ago

Application getting crashed when I try to exclude some Mapbox-core packages in order to resolve duplicate classes issue.

build.gradle

// Maps Navigation dependencies implementation "com.mapbox.navigation:ui-dropin:2.11.0" implementation "com.mapbox.navigation:android:2.11.0" implementation "com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6", { exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-core' }

//Search SDK integration
implementation ("com.mapbox.search:autofill:1.0.0-beta.45")
implementation ("com.mapbox.search:discover:1.0.0-beta.45")
implementation ("com.mapbox.search:offline:1.0.0-beta.45")
implementation ("com.mapbox.search:mapbox-search-android:1.0.0-beta.45")
implementation ("com.mapbox.search:mapbox-search-android-ui:1.0.0-beta.45")

// Vision SDk Integration
implementation "com.mapbox.vision:mapbox-android-vision:0.13.0", {
    exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-core'
}
implementation "com.mapbox.vision:mapbox-android-vision-ar:0.13.0", {
    exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-core'
}
implementation "com.mapbox.vision:mapbox-android-vision-safety:0.13.0", {
    exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-core'
}

when I try to add vision libraries like this its crashing with following error:

E/MapboxTelemetry: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/android/core/MapboxSdkInfoForUserAgentGenerator; E/libc++abi: terminating with uncaught exception of type jni::PendingJavaException A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 22560 (Thread-3), pid 22319 (e.ar_navigation)