LogmeinRescue / Android-SDK

Rescue In-App Support Android SDK
http://secure.logmeinrescue.com/welcome/webhelp/EN/SDKa/MobileSDK/c_rasdk_overview.html
Other
5 stars 6 forks source link

Duplicated class - guava issue #66

Closed jie-meng closed 11 months ago

jie-meng commented 11 months ago

Create Android project with newest Android studio, import LogmeinRescue android-sdk, sync and build will get this error:

Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules jetified-guava-19.0 (com.google.guava:guava:19.0) and jetified-listenablefuture-1.0 (com.google.guava:listenablefuture:1.0)

Because Android libraries use com.google.guava:listenablefuture:1.0, which will cause duplicated class with com.google.guava:guava:19.0 which used by LogmeinRescue android-sdk.

tamasgyongyosi commented 11 months ago

Hi @jie-meng , Thanks for sharing this issue. We do not experience anything similar. Could you please tell me exactly which android library uses this? Also, what dependencies are you using?

tamasgyongyosi commented 11 months ago

Hi @jie-meng is this something that might work for you: https://stackoverflow.com/questions/56639529/duplicate-class-com-google-common-util-concurrent-listenablefuture-found-in-modu ?

jie-meng commented 11 months ago

I use

Hi @jie-meng , Thanks for sharing this issue. We do not experience anything similar. Could you please tell me exactly which android library uses this? Also, what dependencies are you using?

androidx.core:core-ktx:1.9.0 This is what the android project use which include ListenableFuture.

When I import

rescuesdkVersion = '3.8.8'
 implementation("com.logmein.rescuesdk:core:${rescuesdkVersion}@aar") {
        transitive = true
    }
    implementation("com.logmein.rescuesdk:resources:${rescuesdkVersion}@aar") {
        transitive = false
    }
    implementation("com.logmein.rescuesdk:camerastreaming:${rescuesdkVersion}@aar") {
        transitive = true
    }

It'll cause the problem. I tried to excude the guava 19 from logmein library, then it'll crash the app when I create session.

Use implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava' it all works, thanks!