mapbox / mapbox-navigation-android

Mapbox Navigation SDK for Android
https://docs.mapbox.com/android/navigation/overview/
Other
622 stars 319 forks source link

Duplicate Dependencies with picasso #4328

Closed juniel03 closed 2 years ago

juniel03 commented 3 years ago

Android API:30 Mapbox Navigation SDK version:1.5.1

Duplicate Class error when building with navigation UI

Duplicate class com.squareup.picasso.Action found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Action$RequestWeakReference found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.AssetRequestHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.BitmapHunter found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.BitmapHunter$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.BitmapHunter$2 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.BitmapHunter$3 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.BitmapHunter$4 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.BitmapHunter$5 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.BitmapHunter$6 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Cache found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Cache$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Callback found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Callback$EmptyCallback found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.ContactsPhotoRequestHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.ContentStreamRequestHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.DeferredRequestCreator found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Dispatcher found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Dispatcher$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Dispatcher$DispatcherHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Dispatcher$DispatcherHandler$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Dispatcher$DispatcherThread found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Dispatcher$NetworkBroadcastReceiver found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Downloader found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.FetchAction found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.FileRequestHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.GetAction found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.ImageViewAction found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.LruCache found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.MarkableInputStream found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.MediaStoreRequestHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.MediaStoreRequestHandler$PicassoKind found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.MemoryPolicy found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.NetworkPolicy found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.NetworkRequestHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.NetworkRequestHandler$ContentLengthException found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$Builder found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$CleanupThread found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$CleanupThread$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$Listener found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$LoadedFrom found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$Priority found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$RequestTransformer found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Picasso$RequestTransformer$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.PicassoDrawable found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.PicassoExecutorService found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.PicassoExecutorService$PicassoFutureTask found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.RemoteViewsAction found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.RemoteViewsAction$AppWidgetAction found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.RemoteViewsAction$NotificationAction found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.RemoteViewsAction$RemoteViewsTarget found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Request found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Request$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Request$Builder found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.RequestCreator found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.RequestHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.RequestHandler$Result found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.ResourceRequestHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Stats found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Stats$StatsHandler found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Stats$StatsHandler$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.StatsSnapshot found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Target found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.TargetAction found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Transformation found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Utils found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Utils$1 found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Utils$PicassoThread found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)
Duplicate class com.squareup.picasso.Utils$PicassoThreadFactory found in modules jetified-picasso-2.71828-runtime.jar (com.squareup.picasso:picasso:2.71828) and picasso-2.5.2.jar (picasso-2.5.2.jar)

dependencies:

implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.vectordrawable:vectordrawable:1.0.0'
    implementation 'com.google.firebase:firebase-core:17.3.0'
    implementation 'com.google.firebase:firebase-messaging:20.1.4'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    //noinspection GradlePath
    implementation 'q.rorbin:badgeview:1.1.3'
    implementation 'com.itlgl:iosdialog:1.0.1'
    implementation "android.arch.work:work-runtime:1.0.0-beta01"
    implementation group: 'com.google.code.gson', name: 'gson', version: '2.5'
    implementation "android.arch.work:work-runtime:1.0.0-beta01"

    implementation 'com.squareup.retrofit2:retrofit:2.6.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.1'

    implementation "com.squareup.okhttp3:okhttp:4.2.2"
    implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.1.1'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2'
    implementation 'com.squareup.retrofit2:converter-scalars:2.6.2'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2'

    // ReactiveX
    implementation 'io.reactivex.rxjava2:rxjava:2.2.12'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'

    implementation 'com.uber.rxdogtag:rxdogtag:0.3.0'
    implementation 'com.uber.rxdogtag:rxdogtag-autodispose:0.3.0'

    implementation 'com.jakewharton.rxbinding3:rxbinding:3.0.0'
    implementation 'com.jakewharton.rxbinding3:rxbinding-appcompat:3.0.0'
    implementation 'com.jakewharton.rxbinding3:rxbinding-recyclerview:3.0.0'

    implementation ("com.mapbox.navigation:ui:1.5.1")
    implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:5.9.0-alpha.1'
LukasPaczos commented 3 years ago

Hey @juniel03, do you have the jetifier enabled? You should have:

android.useAndroidX=true
android.enableJetifier=true

defined in your gradle.properties file.

If that doesn't help, what other dependency brings in the picasso artifacts?

You can run ./gradlew {app_module}:dependencies to see where picasso is coming from and if there are no duplicates.

juniel03 commented 3 years ago

thanks for responding @LukasPaczos , Yes enableJetifier is enabled, and I tried your suggestion of running ./gradlew {app_module}: dependencies and searched for picasso but nothing appeared

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Guardiola31337 commented 2 years ago

Fixed in https://github.com/mapbox/mapbox-navigation-android/pull/5316

Closing.

cc @carstenhag