question

denebinfuse avatar image
denebinfuse asked edward answered

how to fix conflicts when using CFP SDK and Clover Android SDK in version 262.2

Currently, I am developing a native android application. For this, I need:


1. To Use Customer Facing Platform.

2. I need to place the screen in CustomerMode.


For point one I use CFP SDK for the second point the Clover Android SDK as shown below:


implementation ("com.clover.cfp: clover-cfp-sdk: 4.2.1")
implementation ("com.clover.sdk: clover-android-sdk: 248.4")


Everything is fine until I decide to update the latest available version of the Clover Android SDK (from 248.4 to 262.2) as follows:


implementation ("com.clover.cfp: clover-cfp-sdk: 4.2.1")
implementation ("com.clover.sdk: clover-android-sdk: 262.2")


When trying to compile the app it throws me the following errors and I don't know how to solve them:

Execution failed for task ':app:checkSbxDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.clover.sdk.v3.base.Point found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Point$1 found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Point$2 found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Point$CacheKey found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Point$Constraints found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Points found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Points$1 found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Points$2 found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Points$CacheKey found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Points$Constraints found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Signature found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Signature$1 found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Signature$2 found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Signature$CacheKey found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     Duplicate class com.clover.sdk.v3.base.Signature$Constraints found in modules jetified-clover-android-connector-sdk-248.4-runtime (com.clover.sdk:clover-android-connector-sdk:248.4) and jetified-clover-android-sdk-262.2-runtime (com.clover.sdk:clover-android-sdk:262.2)
     


Any idea how to solve this?

Clover Android SDKsemi-integrations
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
edward avatar image
edward answered

Based on this answer, I was able to fix this issue by adding this exclusion:

    implementation('com.clover.cfp:clover-cfp-sdk:4.2.1') {
        exclude group: 'com.clover.sdk', module: 'clover-android-connector-sdk'
   }
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community