question

edward avatar image
edward asked David Marginian answered

Needing some kind of guidance on installing clover-cfp-sdk

Basically having the exact same problem as https://community.clover.com/questions/35561/how-to-fix-conflicts-when-using-cfp-sdk-and-clover.html

Here's my app/build.gradle:

plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdkVersion 31
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.example.apptest"
        minSdkVersion 17
        //noinspection ExpiredTargetSdkVersion
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        multiDexEnabled true

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    implementation 'com.clover.sdk:clover-android-sdk:248.4'
    implementation 'com.clover.cfp:clover-cfp-sdk:4.2.1'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

Here's my build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.5.10"
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.2"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Here's the error:

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)

Am I missing something? Do I need to use an earlier version of the Clover Android SDK? Is there a current example anywhere?

Clover Android 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.

1 Answer

·
David Marginian avatar image
David Marginian answered

The clover-cfp-sdk needs to be released with the 262.2 version of clover-android-connector-sdk. Until that happens adding an exclusion might do the trick.

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